[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[XEN PATCH 08/15] build: use $(filechk, ) for all compat/.xlat/%.lst
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Date: Tue, 23 May 2023 17:38:04 +0100
- Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Tue, 23 May 2023 16:38:46 +0000
- Ironport-data: A9a23:jbqg+q/wFFznlahHhgozDrUDs36TJUtcMsCJ2f8bNWPcYEJGY0x3y jFJCjqFPqqMa2fwKtgkaIiz901U6MeGn9JhGlNkrHw8E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOG6UKicYXoZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ird7ks31BjOkGlA5AdmOKoQ5AW2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDklnz 9BGBDpSVymNpOuxyuujEbIviJgKeZyD0IM34hmMzBncBPciB5vCX7/L9ZlT2zJYasJmRKiEI ZBDMHw2MUqGOkcUUrsUIMtWcOOAj3/jczpeuRSNqLA++WT7xw1tyrn9dtHSf7RmQO0MxhfE/ DiXoj2R7hcyLMOH2HmPzlGQmebkpjP1Ca9JH4KU+as/6LGU7jNKU0BHPbehmtG7l0q/VtR3O 0ESvC00osAa9kamU938VB2Qu2Ofs1gXXN84O/I+wBGAzOzT+QnxLnMfUjdLZdgitck3bT8nz FmEm5XuHzMHmK2YTzeR+6mZqRu2ODMJNikSaCkcVwwH7tL/5oYpgXryos1LSfDvyIevQHepn m7M9XJl71kOsSIV/4yB0Q7riW2Vn5bqRwk/vx2MBSGrsiosMeZJeLeUwVTc6P9BKqOQQV+Ao GUIlqCi0QweMX2evHfTGbtQRdlF897AaWSB2gA3Q/HN4hz3oxaekZZsDCaSzauDGuINYnfXb UDaomu9D7cDbSLxPcebj29cYvnGLJQM9/y/Dpg4jfIUOPCdkTNrGwkwDXN8J0i3zCARfVgXY P93i/qEA3cAErhAxzGrXeob2rJD7nlglT+MFcinlEX+ieb2iJuppVAtaQHmUwzExPnc/FW9H yh3bKNmNCmzoMWhO3KKoOb/3HgBLGQhBICelvG7gtWre1I8cEl4Uq+5/F/UU9A990ijvruSr y7Vt44x4AaXuEAr3i3RMioyN+y3DccjxZ/5VAR1VWuVN7EYSd7HxM8im1EfJtHLKMQLISZIc sQ4
- Ironport-hdrordr: A9a23:t42FNq4vKkCZFEnorQPXwPLXdLJyesId70hD6qkXc3Bom62j+P xG+c5x6faaslgssR0b+OxoWpPwIk80hKQU3WB5B97LNmTbUQCTXeNfBOXZslrdMhy72ulB1b pxN4hSYeeAa2SSVPyKhTVQxexQpOW6zA==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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@xxxxxxxxxx>
---
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
|