bug-automake
[Top][All Lists]
Advanced

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

bug#48188: Manual: Multiple outputs


From: Karl Berry
Subject: bug#48188: Manual: Multiple outputs
Date: Sat, 8 May 2021 19:39:24 -0600

    fh> > One intermediate solution that's said to work except with phony
    > > dependencies doesn't actually seem to work:
    > > 
    > > % cat Makefile
    > > all: data.c data.h
    > > data.c data.h: data.foo
    > >         touch data.c data.h
    > > data.h: data.c
    > > 
    > > % rm -f data.[ch]; touch data.foo; make -j
    > > touch data.c data.h
    > > touch data.c data.h

Yeah :(.

    ps> This example is wrong.  You need the data.h target to have a recipe
    > associated with it; it could be rewritten as:
    > 
    >   data.h: data.c ;
    > 
    > (note the extra semicolon).  Now it will work.

    fh> This gives me this error:
    > Makefile:4: warning: overriding recipe for target 'data.h'
    > Makefile:3: warning: ignoring old recipe for target 'data.h'

To be expected, since now data.h is a target in two separate rules with
recipes, and that is not allowed.
    
    fh> It goes away if I take out data.h in the first rule (not sure
    what other consequences this might have).

Well, it defeats the original purpose, which is to specify that data.foo
generates both data.c and data.h. 


The only thing I can think of to do is remove that example.  Maybe it
was never tried.

Paul (or anyone), do you see a better change to make?

    fh> This suggestion still stands (to the automake manual maintainers):
    > > More importantly (at least to me), the final paragraph of the page
    > > should really be first. 

Ok. --thanks, karl.





reply via email to

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