help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

weird error(?) in "-f" option ????


From: Robert P. J. Day
Subject: weird error(?) in "-f" option ????
Date: Mon, 15 Dec 2003 09:52:12 -0500 (GMT-05:00)

  ok, i've just run across something that is confusing the heck out of me.
in testing the snippet in the make manual for overriding part of another
makefile, i wrote the following makefile:

$ cat mk1
foo:
        @echo building foo in mk1.
        @touch foo
%: force
        @echo Invoking makefile mk2 for target address@hidden
        @${MAKE} -f mk2 $@
force: ;


  i also have a trivial "mk2" file, but what's baffling is what happens
when i run the following command:

$ make -f mk1 foo
Invoking makefile mk2 for target mk1.        ????  what the ... ????
make[1]: Entering directory `/tmp/make'
make[1]: Nothing to be done for `mk1'.
make[1]: Leaving directory `/tmp/make'
make: `foo' is up to date.
$

  how is it that the value of the "-f" option is being picked up as
a *target* to be processed in that first makefile mk1?  i'm confused.
am i doing something thoroughly stupid here?  i have no idea how to
interpret this output.

rday







reply via email to

[Prev in Thread] Current Thread [Next in Thread]