%% Joerg Krautwurst-Schmid <[EMAIL PROTECTED]> writes:
jk> I use gmake to call another build process (ant) to compile and
jk> build java classes. Now I want to pass a special option (e.g
jk> debug) to ant. But I don't know how to do this ? Is there a
jk> chance to pass options from the commandline and handle them in the
jk> Makefile or do I have to use environment variables to do this and
jk> check if the variable is set etc.
The only way to do this is by setting a make variable on the command
line.
For example, suppose your makefile has:
ANT = ant
ANTFLAGS = -foo
... $(ANT) ($ANTFLAGS) -o $@ $<
(note I completely made up this syntax, I don't know anything about ant :)
Then, you could invoke make as:
make ANTFLAGS='-foo -bar'
to override that setting and change the flags passed to ant. You don't
have to test for this at all: command-line variable settings always take
precedence over variable settings in the makefile.
See the GNU make manual, section "Overriding Variables".
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make