[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: express multiple output files in gnu make
From: |
Wayne Throop |
Subject: |
Re: express multiple output files in gnu make |
Date: |
Sat, 8 Jun 2002 23:03:25 -0700 (PDT) |
: > sh-2.04$ cat makefile
: > x.c x.h: x.src; : building $@
: > sh-2.04$ make x.c x.h
: > : building x.c
: > : building x.h
: >
: > sh-2.04$ cat makefile
: > %.c %.h: %.src; : building $@
: > sh-2.04$ make x.c x.h
: > : building x.c
: > make: Nothing to be done for `x.h'.
: This is expected behavior
That is, after all, why I said "consider these expected behaviors".
: the second example tells Make that both x.c and x.h are produced by
: the rule's command. This is explained in the Make manual.
Indeed it is. That's pretty much *why* one would expect those behaviors.
: > If they are related by a stem, then you can use a pattern
: > rule as in the second case above; but what if they aren't?
: Either make them related (by changing names or using % ingeniously),
: or you are out of luck.
Do you have a reason why not to leave the names unrelated and use
foo: bar;
bar: baz; cmd
That is, is there a specific failure mode I'm overlooking?
Wayne Throop address@hidden