All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Ian Jackson" <iwj@xenproject.org>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: [PATCH v3][4.15] tools/x86: don't rebuild cpuid-autogen.h every time
Date: Fri, 12 Mar 2021 17:50:09 +0100	[thread overview]
Message-ID: <96ad6d6e-84f0-89dd-f7b1-1e1ddc2183fd@suse.com> (raw)
In-Reply-To: <1365013b-1e90-aeb2-3c80-7a5c6284c46a@suse.com>

The first thing the "xen-dir" rule does is delete the entire xen/
subtree. Obviously this includes deleting xen/lib/x86/*autogen.h. As a
result there's no original version for $(move-if-changed ...) to compare
against, and hence the file and all its consumers would get rebuilt
every time. Instead only find and delete all the symlinks.

Fixes: eddf9559c977 ("libx86: generate cpuid-autogen.h in the libx86 include dir")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v3: Don't use xargs. Don't hide errors.
v2: Different approach.

--- a/tools/include/Makefile
+++ b/tools/include/Makefile
@@ -19,8 +19,8 @@ xen-foreign:
 	$(MAKE) -C xen-foreign
 
 xen-dir:
-	@rm -rf xen acpi
 	mkdir -p xen/libelf acpi
+	find xen/ acpi/ -type l -exec rm '{}' +
 	ln -s $(XEN_ROOT)/xen/include/public/COPYING xen/
 	ln -s $(XEN_ROOT)/xen/include/public/*.h xen/
 	ln -s $(XEN_ROOT)/xen/include/public/*/ xen/


  parent reply	other threads:[~2021-03-12 16:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 14:38 [PATCH v2 0/2] tools/x86: adjust populating of tools/include/xen/ Jan Beulich
2021-03-11 14:40 ` [PATCH v2 1/2][4.15] tools/x86: don't rebuild cpuid-autogen.h every time Jan Beulich
2021-03-11 15:29   ` Roger Pau Monné
2021-03-11 16:00     ` Jan Beulich
2021-03-11 16:21       ` Roger Pau Monné
2021-03-12  8:45     ` Jan Beulich
2021-03-12  9:17       ` Roger Pau Monné
2021-03-12  9:22         ` Jan Beulich
2021-03-12 10:22   ` Ian Jackson
2021-03-11 14:40 ` [PATCH v2 2/2] tools/x86: move arch-specific include/xen/ population into arch-specific rule Jan Beulich
2021-03-12 10:24   ` Ian Jackson
2021-03-12 16:50 ` Jan Beulich [this message]
2021-03-12 16:59   ` [PATCH v3][4.15] tools/x86: don't rebuild cpuid-autogen.h every time Ian Jackson

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=96ad6d6e-84f0-89dd-f7b1-1e1ddc2183fd@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=roger.pau@citrix.com \
    --cc=wl@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.