All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony PERARD <anthony.perard@citrix.com>
To: <xen-devel@lists.xenproject.org>
Cc: Anthony PERARD <anthony.perard@citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	"Jan Beulich" <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	Wei Liu <wl@xen.org>
Subject: [XEN PATCH 08/15] build: use $(filechk, ) for all compat/.xlat/%.lst
Date: Tue, 23 May 2023 17:38:04 +0100	[thread overview]
Message-ID: <20230523163811.30792-9-anthony.perard@citrix.com> (raw)
In-Reply-To: <20230523163811.30792-1-anthony.perard@citrix.com>

Make use of filechk mean that we don't have to use
$(move-if-changed,). It also mean that will have sometime "UPD .." in
the build output when the target changed, rather than having "GEN ..."
all the time when "xlat.lst" happen to have a more recent modification
timestamp.

While there, replace `grep -v` by `sed '//d'` to avoid an extra
fork and pipe when building.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 xen/include/Makefile | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/xen/include/Makefile b/xen/include/Makefile
index 96d5f6f3c8..2e61b50139 100644
--- a/xen/include/Makefile
+++ b/xen/include/Makefile
@@ -93,15 +93,13 @@ targets += $(patsubst compat/%, compat/.xlat/%, $(headers-y))
 $(obj)/compat/.xlat/%.h: $(obj)/compat/%.h $(obj)/compat/.xlat/%.lst $(srctree)/tools/compat-xlat-header.py FORCE
 	$(call if_changed,xlat_headers)
 
-quiet_cmd_xlat_lst = GEN     $@
-cmd_xlat_lst = \
-	grep -v '^[[:blank:]]*$(pound)' $< | sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,[[:blank:]]+$*\.h[[:blank:]]*$$,,p' >$@.new; \
-	$(call move-if-changed,$@.new,$@)
+filechk_xlat_lst = \
+	sed -ne '/^[[:blank:]]*$(pound)/d' -e 's,@arch@,$(compat-arch-y),g' -re 's,[[:blank:]]+$*\.h[[:blank:]]*$$,,p' $<
 
 .PRECIOUS: $(obj)/compat/.xlat/%.lst
 targets += $(patsubst compat/%.h, compat/.xlat/%.lst, $(headers-y))
 $(obj)/compat/.xlat/%.lst: $(srcdir)/xlat.lst FORCE
-	$(call if_changed,xlat_lst)
+	$(call filechk,xlat_lst)
 
 xlat-y := $(shell sed -ne 's,@arch@,$(compat-arch-y),g' -re 's,^[?!][[:blank:]]+[^[:blank:]]+[[:blank:]]+,,p' $(srcdir)/xlat.lst | uniq)
 xlat-y := $(filter $(patsubst compat/%,%,$(headers-y)),$(xlat-y))
-- 
Anthony PERARD



  parent reply	other threads:[~2023-05-23 16:38 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-23 16:37 [XEN PATCH 00/15] build: cleanup build log, avoid user's CFLAGS, avoid too many include of Config.mk Anthony PERARD
2023-05-23 16:37 ` [XEN PATCH 01/15] build: hide that we are updating xen/lib/x86 Anthony PERARD
2023-05-24  6:42   ` Luca Fancellu
2023-05-24  7:04   ` Jan Beulich
2023-05-23 16:37 ` [XEN PATCH 02/15] build: rework asm-offsets.* build step to use kbuild Anthony PERARD
2023-05-24  7:39   ` Luca Fancellu
2023-05-24  8:01     ` Jan Beulich
2023-05-24  8:17       ` Luca Fancellu
2023-05-24 14:09   ` Jan Beulich
2023-05-25 10:36     ` Anthony PERARD
2023-05-23 16:37 ` [XEN PATCH 03/15] build, x86: clean build log for boot/ targets Anthony PERARD
2023-05-24  9:31   ` Andrew Cooper
2023-05-24 14:16   ` Jan Beulich
2023-05-25 11:30     ` Anthony PERARD
2023-05-23 16:38 ` [XEN PATCH 04/15] build: hide policy.bin commands Anthony PERARD
2023-05-24  7:11   ` Jan Beulich
2023-05-25 13:34     ` Anthony PERARD
2023-05-25 14:23       ` Jan Beulich
2023-05-25 12:48   ` Daniel P. Smith
2023-05-23 16:38 ` [XEN PATCH 05/15] build: introduce a generic command for gzip Anthony PERARD
2023-05-24  7:17   ` Jan Beulich
2023-05-25 13:42     ` Anthony PERARD
2023-05-23 16:38 ` [XEN PATCH 06/15] build: quiet for .allconfig.tmp target Anthony PERARD
2023-05-24  7:30   ` Jan Beulich
2023-05-23 16:38 ` [XEN PATCH 07/15] build: move XEN_HAS_BUILD_ID out of Config.mk Anthony PERARD
2023-05-24  8:06   ` Luca Fancellu
2023-05-25 11:56   ` Jan Beulich
2023-05-25 14:31     ` Anthony PERARD
2023-05-23 16:38 ` Anthony PERARD [this message]
2023-05-24  8:13   ` [XEN PATCH 08/15] build: use $(filechk, ) for all compat/.xlat/%.lst Luca Fancellu
2023-05-25 12:04   ` Jan Beulich
2023-05-25 14:36     ` Anthony PERARD
2023-05-23 16:38 ` [XEN PATCH 09/15] build: hide commands run for kconfig Anthony PERARD
2023-05-24  8:23   ` Luca Fancellu
2023-05-25 12:12   ` Jan Beulich
2023-05-23 16:38 ` [XEN PATCH 10/15] build: rename $(AFLAGS) to $(XEN_AFLAGS) Anthony PERARD
2023-05-24  8:30   ` Luca Fancellu
2023-05-24  8:47     ` Luca Fancellu
2023-05-25 12:17       ` Jan Beulich
2023-05-23 16:38 ` [XEN PATCH 11/15] build: rename CFLAGS to XEN_CFLAGS in xen/Makefile Anthony PERARD
2023-05-24  8:45   ` Luca Fancellu
2023-05-25 12:28   ` Jan Beulich
2023-05-23 16:38 ` [XEN PATCH 12/15] build: avoid Config.mk's CFLAGS Anthony PERARD
2023-05-24  9:34   ` Luca Fancellu
2023-05-25 12:41   ` Jan Beulich
2023-05-23 16:38 ` [XEN PATCH 13/15] build: fix compile.h compiler version command line Anthony PERARD
2023-05-23 18:14   ` Andrew Cooper
2023-05-25 12:48     ` Jan Beulich
2023-05-24  9:43   ` Luca Fancellu
2023-05-25 12:50     ` Jan Beulich
2023-05-30 10:14     ` Jan Beulich
2023-05-30 12:14       ` Luca Fancellu
2023-05-23 16:38 ` [XEN PATCH 14/15] Config.mk: move $(cc-option, ) to config/compiler-testing.mk Anthony PERARD
2023-05-24 10:07   ` Luca Fancellu
2023-05-30 10:43   ` Jan Beulich
2023-05-23 16:38 ` [XEN PATCH 15/15] build: remove Config.mk include from Rules.mk Anthony PERARD
2023-05-24 10:27   ` Luca Fancellu
2023-05-30 10:50   ` Jan Beulich
2023-05-24  9:27 ` [XEN PATCH 00/15] build: cleanup build log, avoid user's CFLAGS, avoid too many include of Config.mk 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=20230523163811.30792-9-anthony.perard@citrix.com \
    --to=anthony.perard@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --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.