List Info

Thread: .PHONY, FORCE, target execution




.PHONY, FORCE, target execution
user name
2006-05-03 13:50:38
 
> If you need the banner to be printed before anything in
the 
> moduleX tree is run then you can just use a pattern
rule:
> 
>      .PHONY : all
>      all : module1 module2
> 
>      .PHONY : module1 do_module1
>      module1 : MODULENAME:=module1
>      module1 : $$.banner do_module1
> 
>      %.banner:
>          echo "BANNER --- $(MODULENAME) ---
BANNER"

When I tried this I didn't even know about
.SECONDEXPANSION. Don't you need
that to run this example? Why did the $$ expand
correctly in this case?
.SECONDEXPAND is not default as far as I could tell, or is
it?

--
Joost Leeuwesteijn


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
.PHONY, FORCE, target execution
user name
2006-05-03 14:08:11
%% "Leeuwesteijn,Joost"
<joost.leeuwesteijndraeger.com> writes:

  >> module1 : $$.banner do_module1

  l> When I tried this I didn't even know about
.SECONDEXPANSION. Don't
  l> you need that to run this example? Why did the
$$
expand correctly
  l> in this case?  .SECONDEXPAND is not default as far
as I could tell,
  l> or is it?

You have to read the NEWS file.

There was a change between GNU make 3.80 and 3.81.  In 3.80,
the System
V make feature that expands $ (and only $) twice
in the prerequisites
list was automatically on, all the time.

Starting in 3.81, the much more general secondary expansion
feature is
available, which is a superset of, and subsumes, that
feature, but ONLY
when the .SECONDEXPANSION target is set.

-- 
------------------------------------------------------------
-------------------
 Paul D. Smith <psmithgnu.org>          Find
some GNU make tips at:
 http://www.gnu.org        
             http://make.paulandlesl
ey.org
 "Please remain calm...I may be mad, but I am a
professional." --Mad Scientist


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )