[Top][All Lists]

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

RE: .PHONY, FORCE, target execution

From: Leeuwesteijn,Joost
Subject: RE: .PHONY, FORCE, target execution
Date: Tue, 2 May 2006 15:24:05 +0200

> Ugh.  That doesn't seem like a good idea; you are inventing something 
> quite complex for a simple problem.

I know ;-) I just liked the idea of a makefile full of FRAUD's and PHONY's
And it would give me my banner :-)

> What you want is to reuse a bit of code in your Makefile.

Yes, but I didn't know how, yet.

> If you need the banner to be printed before anything in the 
> moduleX tree is run then you can just use a pattern rule:
>      %.banner:
>          @echo "BANNER --- $(MODULENAME) --- BANNER"

Ah, new insight! Thanks! Targets are executed only once, I get that now, but
this way your basically making (prefixed) "copies" of the target, and reuse
the recipe. I never thought of fixing it this way.

Too bad the module target is still considered out of date because of the
%.banner target; but I can live with that. I don't really need the
"everything up to date" status anyway.

> Of course that relies on assuming that Make does 
> left-to-right traversal of the tree and fails horribly if you 
> do parallelism.

That's true. We only have a very small project (especially compared to other
list subscribers I can imagine) so this will do for now. I'll mention it in
the documentation just to make sure people will notice its

Joost Leeuwesteijn

reply via email to

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