help-make
[Top][All Lists]
Advanced

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

Re: program creating two targets


From: Werner LEMBERG
Subject: Re: program creating two targets
Date: Wed, 03 Sep 2008 08:00:19 +0200 (CEST)

> > >   foo: file1 file2
> > >           bar
> 
> You mistyped this.  You mean (based on your description above), that
> you need a target like this:
> 
>         file1 <and> file2:
>               bar
>         foo: file1 file2

Yep.

> [...] you have to use a trick I usually refer to as a "sentinel
> file".  Write your rule like this:
> 
>         foo: file1 file2
>         file1 file2: .sentinel
>         .sentinel:
>               bar
>               @touch $@

This works, thanks!  Please document this restriction in section
`Multiple Targets in a Rule' (together with your solution).


    Werner




reply via email to

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