help-make
[Top][All Lists]
Advanced

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

Re: Repeated execution of the same phony target. How?


From: Cédric Lucantis
Subject: Re: Repeated execution of the same phony target. How?
Date: Thu, 22 Mar 2007 01:10:59 +0100
User-agent: KMail/1.9.5

> Hi there,
>
> 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?
>

First I'd say this is a really strange idea, as the purpose of make is 
precisely to _not_ do the same thing twice. So maybe you should reconsider 
what you are trying to do... But if you really have a good reason for this, I 
only see one solution:

.PHONY: hello hello-twice

hello:
        @echo Hello

hello-twice:
        make hello
        make hello

then run 'make hello-twice'

-- 
Cédric Lucantis




reply via email to

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