On Fri, Aug 9, 2013 at 12:59 PM, Ed Hutchins <e...@demeterr.com> wrote:
...
> In my case I'd like to have "init", "start" and "start_clean" end-user
> targets which reuse common
> targets which in turn depend on targets specified by the above semantic
> intent. If there were a
> true order-only operator (say ||), I could do:
>
> .PHONY: <all of the below>
>
> init_server: <some initialization for a running server>
> start_server: <start a server and load existing database info>
> start_clean_server: <start a server and create a clean database>
> common: || init_server start_server start_clean_server
> init: init_server common
> start: start_server common
> start_clean: start_server common
>
> If I try the above with the current order-only | operator all three 
> dependencies are
> invoked by common. Is there a way to get the effect of the above that anyone 
> can think of?

Sounds to me like the commands currently in 'common' should be saved
in a macro which is used by the 'init', 'start', and 'start_clean'
targets and the 'common' target itself eliminated.  Indeed, the same
may be true of 'init_server', 'start_server', and
'start_clean_server', particularly if they don't have any
dependencies.  How is making them targets useful?


Philip Guenther

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to