Thanks Sam. Using the defer assignment, I was able to get it to work exactly as I wanted with; CFLAGS = -g -Wall -O2 -Wa,[email protected]
However, when I added your further enhancement of dropping the suffix, I was getting a null string again. Turns out that you forgot the ":" in the middle there. It worked fine with the following; CFLAGS = -g -Wall -O2 -Wa,-ahl=$(@:.o=.s) Thank you again for your help. Cheers, Jess - http://jt0.org 2008/12/21 Sam Ravnborg <[email protected]>: >> >> So, my modified CFLAGS looks like this; >> CFLAGS := -g -Wall -O2 -Wa,-ahl=file.s > > In make there are two different kind of assignments. > The one you used above ":=" where CFLAGS is assigned the > the exact value you specify on the time of assignment. > >> The best option I can see for this is using the automatic variable $...@. >> Making CFLAGS look like; >> CFLAGS := -g -Wall -O2 -Wa,[email protected] > > And what you want to do here is to tell make to defer the assignmnet > of CFLAGS unitl you use the variable because only at that > time you know the value of $...@. > To do so use "=" as assignment operator like this: > > CFLAGS = -g -Wall -O2 -Wa,[email protected] > > As an further enhancement you can drop the original > suffix like this: > CFLAGS = -g -Wall -O2 -Wa,-ahl=$(@.o=.s) > > Sam > _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
