From: Wei Liu <wei.liu2@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH for-4.7] docs/build: Work around apparent bug with multi-target rules
Date: Mon, 25 Apr 2016 14:50:47 +0100 [thread overview]
Message-ID: <20160425135047.GK11686@citrix.com> (raw)
In-Reply-To: <22302.7484.584846.314961@mariner.uk.xensource.com>
On Mon, Apr 25, 2016 at 02:35:56PM +0100, Ian Jackson wrote:
> Andrew Cooper writes ("[PATCH for-4.7] docs/build: Work around apparent bug with multi-target rules"):
> > The `make` manual documents that a rule of the form
> >
> > target1 target2: prereq
> > recipe
> >
> > is equivilent to
> >
> > target1: prereq
> > recipe
> > target2: prereq
> > recipe
> >
> > This is correct if only target1 or target2 is wanted, but is not the
> > case if both target1 and target2 are wanted to be rebuilt in the
> > same pass. In such a case, executing the recipe to generate target1
> > causes the entire rule to be considered complete, short circuiting
> > the search to regenerate target2.
>
> This is not a bug in make. From the manual I have here (wheezy):
>
> Suppose you would like to vary the prerequisites according to the
> target, much as the variable `$@' allows you to vary the commands.
> You cannot do this with multiple targets in an ordinary rule, but
> you can do it with a "static pattern rule". *Note Static Pattern
> Rules: Static Pattern.
>
> and (from `Pattern Intro'):
>
> Pattern rules may have more than one target. Unlike normal
> rules, this does not act as many different rules with the same
> prerequisites and commands. If a pattern rule has multiple
> targets, `make' knows that the rule's commands are responsible for
> making all of the targets. The commands are executed only once to
> make all the targets.
>
> So this is a bug in the Makefile. Your patch looks like a right
> approach to me. A static pattern rule would be the other option.
>
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
Thank you both for handling this.
Andrew, I think you need to resubmit with updated subject line and
commit message.
Wei.
> Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-04-25 13:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-25 13:00 [PATCH for-4.7] docs/build: Work around apparent bug with multi-target rules Andrew Cooper
2016-04-25 13:35 ` Ian Jackson
2016-04-25 13:50 ` Wei Liu [this message]
2016-04-25 13:49 ` Andrew Cooper
2016-04-25 15:01 ` Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160425135047.GK11686@citrix.com \
--to=wei.liu2@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.