[jamming] setting CCFLAGS question.....

Anuj Goyal anuj.goyal at gmail.com
Tue Apr 12 22:16:00 PDT 2005


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