[jamming] Re: setting CCFLAGS question.....

Anuj Goyal anuj.goyal at gmail.com
Tue Apr 12 22:37:46 PDT 2005


doh, I think I answered my own question in a previous post....

http://p4tress.perforce.com/pipermail/jamming/2005-March.txt

it looks like I have to modify Jam in order to get the behavior I want.... 

On 4/12/05, Anuj Goyal <anuj.goyal at gmail.com> wrote:
> How do I get jam to set CCFLAGS on a.o without picking up the "global" CCFLAGS?
> I know I could manually set CCFLAGS on each file seperately, but I
> want a way to completely override the CCFLAGS variable.
> 
> $ ls
> -rw-r--r--    1 u3535435 ftpusers      323 Apr 13 01:12 Jamfile
> -rw-r--r--    1 u3535435 ftpusers        0 Apr 13 01:00 a.c
> -rw-r--r--    1 u3535435 ftpusers        0 Apr 13 01:00 b.c
> 
> $ cat Jamfile
> CCFLAGS ?= -globalme ;
> 
> CCFLAGS on a.o = -Dbeta ;  #  This does not provide the override that I want
> 
> local _src = b.c ;
> Objects $(_src) ;
> 
> Object a.o : a.c ;
> ObjectCcFlags a.c : -Dapple ;   #  nor does this
> 
> MainFromObjects foo : a.o  $(_src:S=$(SUFOBJ)) ;
> 
> $ jam -an
> ...found 13 target(s)...
> ...updating 3 target(s)...
> Cc a.o
> 
> cc -c -o a.o -Dbeta -globalme -O -Dapple  -I. a.c
> 
> Cc b.o
> 
> cc -c -o b.o -globalme -O  -I. b.c
> 
> Link foo
> 
> cc  -o foo  a.o b.o
> 
> Chmod1 foo
> 
> chmod 711 foo
> 
> ...updated 3 target(s)...
>




More information about the jamming mailing list