On 22 March 2007 07:51, John Graham-Cumming wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Florian Sauer wrote:
>> with the Makefile below I want it to print "Hello" twice, when I run:
>> 
>>> make test test
>> 
>> but instead it prints:
>> 
>> Hello
>> make: Nothing to be done for `test'.
>> 
>> Is there a way so that i can make it print "Hello" twice?
> 
> No.
> 
> You could do:
> 
> make test ; make test
> 
> But fundamentally make builds things once.


numbers:=1 2 3 4 5 6 7 8 9 10 11 12 13  [ ... a big number ... ]
make_tests:=$(filter test,$(MAKECMDGOALS))
none:=
sp:=$(none) $(none)
define add-intermediate-target

.PHONY : .test-intermediate$(1)

test-intermediate$(1) :
        @Echo "Hello world"

test: test-intermediate$(1)
 
endef

foo:=$(foreach xxx,$(numbers),$(if $(word $(xxx),$(make_tests)),\
$(call add-intermediate-target,$(xxx))))
$(eval $(foo))

.PHONY : test
test:


  ;-)


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to