[Top][All Lists]

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

Re: Question about pattern rule with multiple targets

From: Philip Guenther
Subject: Re: Question about pattern rule with multiple targets
Date: Fri, 27 Jun 2014 16:12:52 -0700

On Fri, Jun 27, 2014 at 2:52 PM, Tom Varga <address@hidden> wrote:
b.zoo1 really only depends on b.bar1
b.zoo2 really only depends on b.bar2

However, only one rule (and tool) is used to build both b.bar1 and b.bar2

I really don't want force b.zoo1 to artificially depend on b.bar2 as it's not a real dependency.

I was really just hoping to be able to convince gnumake that b.bar1 and b.bar2 are built with the same rule

It works just fine for that!

and MUST be consistent, that is both having been built at the same time and that both exist too.

Ah, *this* is the issue, the fact that you can't use generated files from different runs.  For most(?) program that generate multiple files, mixing and matching isn't an issue when the source file is unchanged.  If the source file is changed, then make's current bits handle it just fine, rebuilding both, of course.

There's certainly some way to express the "if the either file is missing, rebuild both" using $(if) and $(wildcard) to check for existence, but my reaction right now is "fix the tool that isn't generating consistent output"...

Philip Guenther

reply via email to

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