Hi,
How do you create a variable on the fly within a
pattern rule?
If I have two files called 'myfile.c' and
'anotherfile.c', a pattern rule for '(%.o) : %.c' I
want to be able to pass 'MYFILE_DEFS' and
'ANOTHERFILE_DEFS' as a define to $(CC) along the
lines of...
DEF=`echo $(basename $<) | tr '[a-z]' '[A-Z]'`_DEFS
...so that I can perform...
gcc -DMYFILE_DEFS myfile.c ...
gcc -DANOTHERFILE_DEFS anotherfile.c ...
...for each prerequisite.
Thanks in advance,
Barry
___________________________________________________________
ALL-NEW Yahoo! Messenger - all new features - even more fun!
http://uk.messenger.yahoo.com
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make