[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Passing variables to a Makefile



Am Donnerstag, den 11.10.2007, 10:52 +0900 schrieb Charles Plessy: 

> in a package I prepare, there is the following line in a source/Makefile:
> 
>   CPPFLAGS=-O3 -funroll-loops -march=i686 -mfpmath=sse -msse  -mmmx
> 
> This is obviously not convenient for building on many platforms, so I
> decided to override it with the following command in debian/rules:
> 
>   CPPFLAGS='$(CFLAGS)' $(MAKE) --environment-overrides --directory=source

$(MAKE) -C source CPPFLAGS='$(CFLAGS)'

> However, I am quite unexperienced with makefiles, and my gut feeling
> tells me that I may be doing something wrong... Can somebody tell me ?
> 
> ( Just in case one wants to see more context, I have uploaded the package
> on mentors: http://mentors.debian.net/debian/pool/main/d/dialign-t/dialign-t_0.2.2-1.dsc
> It is work in progress unsuitable for anyghing else! )

One issue in debian/rules:

+       install -o 755 source/dialign-t debian/dialign-t/usr/bin/
+       dh_install      conf/*  usr/share/dialign-t

You mean `install -m'. -o sets the ownership. However, you can safely
use dh_install here, because dh_fixperms (binary-arch target) will set
the right permissions. You further don't need to run dh_installdirs for
directories, used in dh_install. The latter will automatically care
about non-existing directories, like usr/share/dialign-t. You only need
to create the diretories first, if you e.g. use `install' instead of
dh_install or of you want to create links there.

> 
> Have a nice day,
> 
> -- 
> Charles Plessy
> http://charles.plessy.org
> Wako, Saitama, Japan
> 
> 



Reply to: