[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with "silent include" and special target ".DEFAULT"
From: |
Paul D. Smith |
Subject: |
Re: problem with "silent include" and special target ".DEFAULT" |
Date: |
Mon, 3 Feb 2003 11:33:41 -0500 |
%% Helmut Dipper <address@hidden> 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 <address@hidden> 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