help-make
[Top][All Lists]
Advanced

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

Re: Help-make Digest, Vol 94, Issue 23


From: ali hagigat
Subject: Re: Help-make Digest, Vol 94, Issue 23
Date: Sat, 25 Sep 2010 13:06:01 +0330

Please look at this example:
touch di4/preq1
---------------------------------------------------------
vpath preq1 di4
all5:  preq1
        @echo "kkkkkk"
        @touch $<
preq1: preq2
        @echo "llllllll"
        @touch $@
preq2:
        @echo "mmmmmmm"
------------------------------------------------------------
According to the manual, first directory search is done and then
prerequisites will be processed.
Directory search considers preq1 as di4/preq1 internally and then in
Step 4, first the prerequisites will be processed.
In the second rule of the example, target is preq1 and is not
considered di4/preq1 and so its command @touch $@
It is like the pathname has been thrown away and in the first rule,
again, pathname is thrown away and @touch $< is executed with preq1
not di4/preq1.

In the manual, part, 4.b when it says :
"the target is rebuilt using the file name specified in the makefile."
The word , target , may refer to preq1 or all5!! and for both the
pathname is thrown away.

And the last question is that, why the pathname found before Step 4,
were not used at the beginning of Step 4, (processing the
prerequisites)?!!



reply via email to

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