From: Ian Campbell <ian.campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Jonathan Creekmore <jonathan.creekmore@gmail.com>,
Tim Deegan <tim@xen.org>, Keir Fraser <keir@xen.org>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] build: fix dependencies for files compiled from their parent directory
Date: Thu, 26 Nov 2015 10:47:54 +0000 [thread overview]
Message-ID: <1448534874.13576.6.camel@citrix.com> (raw)
In-Reply-To: <5656EF2702000078000B94D4@prv-mh.provo.novell.com>
On Thu, 2015-11-26 at 03:38 -0700, Jan Beulich wrote:
> > > > On 26.11.15 at 10:51, <ian.campbell@citrix.com> wrote:
> > On Thu, 2015-11-26 at 00:43 -0700, Jan Beulich wrote:
> > > > > > On 25.11.15 at 17:26, <ian.campbell@citrix.com> wrote:
> > > > On Wed, 2015-11-25 at 09:16 -0700, Jan Beulich wrote:
> > > > > The use of $(basename ...) here was wrong (yet I'm sure I tested
> > > > > it).
> > > >
> > > > Is the issue here that xen/arch/x86/x86_64/.compat.o.d ought really
> > > > to
> > > > be
> > > > xen/arch/x86/.x86_64.compat.o.d?
> > >
> > > No, xen/arch/x86/x86_64/.compat.o.d is the correct name. Just
> > > that $(dir $(1)).$(basename $(notdir $(1))).d produces
> > > xen/arch/x86/x86_64/.compat.d (i.e. strips the .o, which is not in
> > > line with $(@D)/.$(@F).d used to generate those files), and hence
> > > neither dependency tracking nor cleaning work.
> >
> > My tree, which was last built with 98b69a010c24 has:
> >
> > ianc@cosworth :committer-amd64.git$ find xen -name .\*compat\*
> > xen/arch/x86/.compat.o.d
> > xen/arch/x86/x86_64/.compat.o.d
> > xen/arch/x86/efi/.compat.o.d
> > ianc@cosworth :committer-amd64.git$
> >
> > Which is very odd, since the prevailing xen/Rules.mk has:
> >
> > define gendep
> > ifneq ($(1),$(subst /,:,$(1)))
> > DEPS += $(dir $(1)).$(basename $(notdir $(1))).d
> > endif
> > endef
> >
> > Which I agree looks as if it should have stripped the .o as you
> > describe,
> > but it seems not to have done so. AIUI makes "basename" differs from
> > the
> > CLI basename(1) in that the make one will always strip
>
> You're looking at the wrong thing I'm afraid: How the files get named
> depends on the $(@D)/.$(@F).d thing in CFLAGS. What gets put in
> $(DEPS) (and hence gets included) depends on the construct above.
> So the correctly named files get generated, but they get neither
> included for proper dependency checking, nor would they get
> deleted by the "clean" rule. And since the inclusion of $(DEPS) has a
> minus sign in front, make wouldn't complain about not finding these
> files.
Aha, gotcha now:
$ make clean
[...]
make[3]: Leaving directory '/local/scratch/ianc/devel/committer-amd64.git/xen/arch/x86/x86_64'
rm -f *.o *~ core .*.d x86_64/.compat.d x86_64/.mm.d x86_64/.physdev.d x86_64/.platform_hypercall.d
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-11-26 10:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 16:16 [PATCH] build: fix dependencies for files compiled from their parent directory Jan Beulich
2015-11-25 16:26 ` Ian Campbell
2015-11-26 7:43 ` Jan Beulich
2015-11-26 9:51 ` Ian Campbell
2015-11-26 10:38 ` Jan Beulich
2015-11-26 10:47 ` Ian Campbell [this message]
2015-11-30 16:31 ` Jonathan Creekmore
2015-11-30 16:36 ` Jan Beulich
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=1448534874.13576.6.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=jonathan.creekmore@gmail.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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.