%% Helmut Dipper <[EMAIL PROTECTED]> writes:

  hd> -include aaa
  hd> sinclude bbb

  hd> .DEFAULT:
  hd>         @echo "target: $@"

  hd> #------------------------------------------
  hd> and the results:
  hd> target: bbb
  hd> target: aaa
  hd> gmake: *** No targets.  Stop.

  hd> How can it be avoided that the rule with the special target
  hd> .DEFAULT is applied when trying to remade not existent
  hd> include-files?

You must declare a real rule for the makefiles; even a pattern rule will
do it.

  hd> Must "empty rules" be specified for each include- file which may
  hd> exist or not?

Yes, if you use .DEFAULT.  .DEFAULT can make any file, so it will apply
to _ANY_ file that make wants to build and which doesn't yet exist.

This is a very powerful, and at the some time somewhat uncontrolled,
capability.

-- 
-------------------------------------------------------------------------------
 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


_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to