[Top][All Lists]

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

Rule producing several targets at once?

From: Sébastien Hinderer
Subject: Rule producing several targets at once?
Date: Wed, 28 Feb 2018 11:11:21 +0100

Dear all,

Is it possible to tell make that one produce several files at once?

Assume the following example:

b c: a
        cp a b
        cp a c

It seems make understands it as "To produce c I need to run this rule"
and "To produce b I need to run this rule", rather than "Okay, it will
be enough to run this rule to get obth b and c".

This seems to be especially true when -j is given.

Perhaps one should add a dependency like:

b: a

to avoid this?

But what if it is n targets rather than two which are produced

Any hint?



reply via email to

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