%% "Robert P. J. Day" <[EMAIL PROTECTED]> writes:

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

  rpjd> $ cat mk1
  rpjd> foo:
  rpjd>         @echo building foo in mk1.
  rpjd>         @touch foo
  rpjd> %: force
  rpjd>         @echo Invoking makefile mk2 for target [EMAIL PROTECTED]
  rpjd>         @${MAKE} -f mk2 $@
  rpjd> force: ;


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

  rpjd> $ make -f mk1 foo
  rpjd> Invoking makefile mk2 for target mk1.        ????  what the ... ????

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

Check the GNU make manual section "How Makefiles Are Remade" in the
chapter on "Writing Makefiles".

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "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

Reply via email to