xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>,
	"Ian Jackson" <iwj@xenproject.org>
Subject: [PATCH 1/3] firmware/shim: update linkfarm exclusions
Date: Fri, 30 Apr 2021 16:43:59 +0200	[thread overview]
Message-ID: <d6f37d26-a883-b194-07a9-1ab87d5961f7@suse.com> (raw)
In-Reply-To: <19695ffc-34d8-b682-b092-668f872d4e57@suse.com>

Some intermediate files weren't considered at all at the time. Also
after its introduction, various changes to the build environment have
rendered the exclusion sets stale. For example, we now have some .*.cmd
files in the build tree.  Combine all respective patterns into a single
.* one, seeing that we don't have any actual source files matching this
pattern in the tree. Add other patterns as well as individual files.
Also introduce LINK_EXCLUDE_PATHS to deal with entire directories full
of generated headers as well as a few specific files the names of which
are too generic to list under LINK_EXCLUDES.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/tools/firmware/xen-dir/Makefile
+++ b/tools/firmware/xen-dir/Makefile
@@ -15,9 +15,19 @@ DEP_DIRS=$(foreach i, $(LINK_DIRS), $(XE
 DEP_FILES=$(foreach i, $(LINK_FILES), $(XEN_ROOT)/$(i))
 
 # Exclude some intermediate files and final build products
-LINK_EXCLUDES := '*.[isoa]' '.*.d' '.*.d2' '.config'
-LINK_EXCLUDES += '*.map' 'xen' 'xen.gz' 'xen.efi' 'xen-syms'
-LINK_EXCLUDES += '.*.tmp'
+LINK_EXCLUDES := '*.[isoa]' '*.bin' '*.chk' '*.lnk' '*.gz' '.*'
+LINK_EXCLUDES += lexer.lex.? parser.tab.? conf
+LINK_EXCLUDES += asm-offsets.h asm-macros.h compile.h '*-autogen.h'
+LINK_EXCLUDES += mkelf32 mkreloc symbols config_data.S xen.lds efi.lds
+LINK_EXCLUDES += '*.map' xen xen.gz xen.efi xen-syms check.efi
+
+# To exclude full subtrees or individual files of not sufficiently specific
+# names, regular expressions are used:
+LINK_EXCLUDE_PATHS := xen/include/compat/.*
+LINK_EXCLUDE_PATHS += xen/include/config/.*
+LINK_EXCLUDE_PATHS += xen/include/generated/.*
+LINK_EXCLUDE_PATHS += xen/arch/x86/boot/reloc[.]S
+LINK_EXCLUDE_PATHS += xen/arch/x86/boot/cmdline[.]S
 
 # This is all a giant mess and doesn't really work.
 #
@@ -32,9 +42,10 @@ LINK_EXCLUDES += '.*.tmp'
 # support easy development of the shim, but has a side effect of clobbering
 # the already-built shim.
 #
-# $(LINK_EXCLUDES) should be set such that a parallel build of shim and xen/
-# doesn't cause a subsequent `make install` to decide to regenerate the
-# linkfarm.  This means that all final build artefacts must be excluded.
+# $(LINK_EXCLUDES) and $(LINK_EXCLUDE_DIRS) should be set such that a parallel
+# build of shim and xen/ doesn't cause a subsequent `make install` to decide to
+# to regenerate the linkfarm.  This means that all intermediate and final build
+# artefacts must be excluded.
 linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE
 	mkdir -p $(D)
 	rm -f linkfarm.stamp.tmp
@@ -46,7 +57,8 @@ linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES)
 			sed 's,^$(XEN_ROOT)/$(d)/,,g' | xargs mkdir -p .);) \
 	$(foreach d, $(LINK_DIRS), \
 		(cd $(XEN_ROOT); \
-		 find $(d) ! -type l -type f $(addprefix ! -name ,$(LINK_EXCLUDES))) \
+		 find $(d) ! -type l -type f $(addprefix ! -name ,$(LINK_EXCLUDES)) \
+		 | grep -v $(patsubst %,-e '^%$$',$(LINK_EXCLUDE_PATHS))) \
 		 >> linkfarm.stamp.tmp ; ) \
 	$(foreach f, $(LINK_FILES), \
 		echo $(f) >> linkfarm.stamp.tmp ;)



  reply	other threads:[~2021-04-30 14:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30 14:39 [PATCH 0/3] firmware/shim: build adjustments Jan Beulich
2021-04-30 14:43 ` Jan Beulich [this message]
2021-05-25 14:12   ` [PATCH 1/3] firmware/shim: update linkfarm exclusions Roger Pau Monné
2021-04-30 14:44 ` [PATCH 2/3] firmware/shim: drop XEN_CONFIG_EXPERT uses Jan Beulich
2021-05-25 14:14   ` Roger Pau Monné
2021-05-25 15:14     ` Jan Beulich
2021-04-30 14:45 ` [PATCH 3/3] firmware/shim: UNSUPPORTED=n Jan Beulich
2021-05-25 14:39   ` Roger Pau Monné
2021-05-25 15:21     ` Jan Beulich
2021-05-25 15:51       ` Roger Pau Monné
2021-05-25 15:54         ` Jan Beulich
2021-05-25 11:10 ` Ping: [PATCH 0/3] firmware/shim: build adjustments Jan Beulich
2021-05-26  7:37 ` [PATCH v2] firmware/shim: UNSUPPORTED=n Jan Beulich
2021-05-26  8:27   ` Roger Pau Monné
2021-05-26  8:31     ` Jan Beulich
2021-05-27  6:49   ` Dario Faggioli
2021-06-02 11:57     ` 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=d6f37d26-a883-b194-07a9-1ab87d5961f7@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).