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 09:51:02 +0000 [thread overview]
Message-ID: <1448531462.17688.155.camel@citrix.com> (raw)
In-Reply-To: <5656C62E02000078000B93C6@prv-mh.provo.novell.com>
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
Just to double check I did:
$ make --version
GNU Make 4.0
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later < http://gnu.org/licenses/gpl.html >
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
ianc@cosworth :committer-amd64.git$ git clean -fdqx xen/
ianc@cosworth :committer-amd64.git$ make -j12 xen -s
__ __ _ _ _____ _ _ _
\ \/ /___ _ __ | || | |___ | _ _ _ __ ___| |_ __ _| |__ | | ___
\ // _ \ '_ \ | || |_ / /_| | | | '_ \/ __| __/ _` | '_ \| |/ _ \
/ \ __/ | | | |__ _| / /__| |_| | | | \__ \ || (_| | |_) | | __/
/_/\_\___|_| |_| |_|(_)_/ \__,_|_| |_|___/\__\__,_|_.__/|_|\___|
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$ git grep -A4 define.gendep xen/Rules.mk
xen/Rules.mk:define gendep
xen/Rules.mk- ifneq ($(1),$(subst /,:,$(1)))
xen/Rules.mk- DEPS += $(dir $(1)).$(basename $(notdir $(1))).d
xen/Rules.mk- endif
xen/Rules.mk-endef
Maybe the behaviour of basename varies with make versions?
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-11-26 9:51 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 [this message]
2015-11-26 10:38 ` Jan Beulich
2015-11-26 10:47 ` Ian Campbell
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=1448531462.17688.155.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.