%% Alan Heinold - High End Server Systems <[EMAIL PROTECTED]> writes:
ah> I bet the answer is very simple but I can't get it to work
ah> given the following make file:
ah> %.build: %.att %.guidance
ah> @echo "Done testing."
ah> %.att:
ah> @ echo "gmake[$(MAKELEVEL)]: $@ does not exist. Linking from parent."
ah> @ ln -s ../$(rtl_name).att $@ ;
ah> %.guidance:
ah> @ echo "gmake[$(MAKELEVEL)]: $@ does not exist. Linking from parent."
ah> @ ln -s ../$(rtl_name).guidance $@ ;
ah> And running the following command:
ah> gmake foo.build
ah> I get the following result:
ah> gmake[0]: foo.att does not exist. Linking from parent.
ah> gmake[0]: foo.guidance does not exist. Linking from parent.
ah> Done testing.
ah> rm foo.guidance foo.att
ah> It's the last line that I don't understand. Why is gmake removing the
ah> foo.att and foo.guidance targets. Is gmake thinking that these are
ah> intermediate targets?
Yes. According to make's definition, they _are_ intermediate targets.
There is no specific reference to them in the makefile.
ah> I tried setting the .SECONDARY target and got the same result.
How did you set it? This should work:
.SECONDARY: foo.att foo.guidance
ah> How do I get gmake to leave the %.foo and %.guidance targets??
You need to either mention them in the makefile, so that they're not
considered intermediate, or make them .SECONDARY or .PRECIOUS, so they
won't be deleted.
--
-------------------------------------------------------------------------------
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