gnu - Makefile Secondary Expansion -


Manual Section 3.8 says:

"During the secondary expansion of clear rules, $ Assess $ @ and $$% , respectively, for the target's file name, and when the goal is a collection member, the name of the target member. $$ < / Code> variable reviews the first condition in the first rule of this goal. Evaluate the list of all the necessary conditions for the $$ ^ and $$ + rules Same goal from (without $$ + duplication and $$ ^ ). The following examples will help clarify these behaviors:

 < Code> .SECONDEXPANSION: foo: foo.1 times.1 $$ $ <$$ ^ $$ + # line # 1 foo: foo.2 bar.2 $$ <$$ ^ $$ + # line # 2 foo: foo.3 bar.3 $$ <$$ ^ $$ + # line # 3   

In the first condition list, all three variables ($$ & lt; $$$, and $$ +) expand to empty string. "

My question: why $$ Extension in empty string? The above paragraph says that its goal should be first for the first rule of this goal. Will this not be a fuo?

Manual misleading, possibly due to typo, first of two sentences:

Blockquote>

$$ & lt; The variable reviews the first condition in this rule for the first rule. $$ ^ and $$ + Evaluate the list of all the necessary conditions for those rules that have already appeared for the same goal (without $$ + iterations and $$ ^).

You can verify that it correctly describes the behavior by running two makefiles:

1

 . SECONDEXPANSION: foo: foo.1 $$ & lt; @echo $ +   

Output is:

  foo.1   

Showing $ $ & Lt; is expanded to empty string then:

Make

 . SECONDEXPANSION: foo: foo.1 foo: foo.2 $$ & lt; @echo $ +   

Now output is:

  foo.2 foo.1 foo.1   

here Clear prerequisites are collected from the foo and foo.1 and foo with the first and second rules of the target, which account for the initial output foo.2 foo.1 and additionally, in the second rule $$ is the first condition of previous rule foo.1 , which is the last foo.1 of the account or output.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -