[packages/hfsplus-tools] - pl, pass CFLAGS and LDFLAGS (no CC, as it must be clang because of Blocks extension)

Jakub Bogusz qboosh at pld-linux.org
Wed Mar 20 07:00:46 CET 2013


On Wed, Mar 20, 2013 at 03:10:26AM +0100, Tomasz Pala wrote:
> On Tue, Mar 19, 2013 at 18:36:49 +0200, Elan Ruusamäe wrote:
> 
> >> +%{__make} \
> >> +	CFLAGS="%{rpmcflags} -fblocks -Wall -I$(pwd)/BlocksRunTime -I$(pwd)/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -DLINUX=1 -DBSD=1 -DVERSION=\\\"%{version}\\\"" \
> >> +	LDFLAGS="%{rpmldflags} -L$(pwd)/BlocksRunTime"
> > wouldn't in such cases when you overwrite make variable, do a patch and 
> > write it into new variable (say OPTFLAGS),

SOD#1 if you want to.
Note that -I options needed to be overridden too, because $(PWD) used in
this makefile is shell-dependent.

> I prefer sed -i on appropriate file, which:
> - is easier to maintain than patch,
> - introduces only flags we explicitly set,
> - doesn't always need update (when something next to the place changes),
>   but would fail when the flags we put in regexp are altered.

Unfortunately there is no option to fail if regex is not matched, so
in many cases sed becomes a no-op for long time...

> > make OPTPFAGS="%{rpmcflags}"
> > 
> > also if you ass CFLAGS as env, not make parameter, makefiles can 
> > CFLAGS+=something, and not needing to copy that contents to .spec
> > 
> > CFLAGS="%{rpmcflags}" make

Makefiles most often use CFLAGS[:]=..., so passing by environent
has no effect.


-- 
Jakub Bogusz    http://qboosh.pl/


More information about the pld-devel-en mailing list