[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[XEN PATCH 05/15] build: introduce a generic command for gzip
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Date: Tue, 23 May 2023 17:38:01 +0100
- Authentication-results: esa2.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:59 +0000
- Ironport-data: A9a23:n7tHLaiFli/lPQhkHvJ7ujoCX161UhAKZh0ujC45NGQN5FlHY01je htvWmGFOv2LZmD8fYp+OYy18BhS6MPdnIRlGQJo/ClnRi4b9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrWCYmYpHlUMpB4J0XpLg/Q+jpNjne+3CgaMv cKai8DEMRqu1iUc3lg8sspvkzsx+qyq0N8klgZmP6sT4QWFzyN94K83fsldEVOpGuG4IcbiL wrz5OnR1n/U+R4rFuSknt7TGqHdauePVeQmoiM+t5mK2nCulARrukoIHKN0hXNsoyeIh7hMJ OBl7vRcf+uL0prkw4zxWzEAe8130DYvFLXveRBTuuTLp6HKnueFL1yDwyjaMKVBktubD12i+ tQ2GQg0Nlezl96MzbTgEbNLgNQRBZDSadZ3VnFIlVk1DN4jSJHHBa7L+cVZzHE7gcUm8fT2P pRDL2A1NVKZPkMJYw1MYH49tL7Aan3XejtEqFWTtOwv7nLa1gBZ27nxKtvFPNeNQK25m27B/ jOXrzmlXkpy2Nq3kCq0+G6vn9XzmhzmZ4ApHq2jq8BonwjGroAUIEJPDgbqyRWjsWa8RtZeJ ko86ico668o+ySDTNPwQhm5q36spQMHVpxbFOhSwB6J4rrZ5UCeHGdsZiVadNUsucsyRDor/ lyEhdXkAXpoqrL9YWKQ8PKYoC2/PQARLHQefmkUQA0d+d7hrYovyBXVQb5e/LWd14OvX2uqm nbT8XZ43u9I5SIW60ml1X72uwv04ajZcjQ44F6MBEWj/jFQPbfwMuRE9mPnxfpHKY+YSHyIs 34Fh9WS4YgyMH2dqMCeaL5TRe/0vp5pJBWZ2AcyRMd5q1xB7lb5JehtDCdCyFCF2yruURvge wfttAxY//e/11P6PPYsM+pd5ynHpJUM9OgJtNiONrKigbArLmdrGR2CgmbOt10BaGB2zckC1 W6zKK5A90oyB6V91yaRTOwAy7ItzS1W7TqNFcykn0z7iuvHPCL9pVI53LymN7pR0U95iF+Nr 4Y32zWikH2zr9ESkgGIqNVOfDjm3FAwBIzsqtw/S9Nv1jFOQTl7Y9eImONJRmCQt/gN/gs+1 i3nCxAwJZuWrSGvFDhmnVg4MOm+Askn/SNnVcHuVH7xs0UejU+UxP93X/MKkXMPrbELISJcJ xXdR/i9Pw==
- Ironport-hdrordr: A9a23:U9TLsKoPt5qbgWg/NZ2IesAaV5oTeYIsimQD101hICG8cqSj+f xG+85rsyMc6QxhIE3I9urhBEDtex/hHNtOkOws1NSZLW7bUQmTXeJfBOLZqlWKcUDDH6xmpM NdmsBFeaTN5DNB7PoSjjPWLz9Z+qjkzJyV
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Make the gzip command generic and use -9 which wasn't use for
config.gz. (xen.gz does use -9)
Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
xen/Rules.mk | 5 +++++
xen/common/Makefile | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/xen/Rules.mk b/xen/Rules.mk
index 59072ae8df..68b10ca5ef 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -63,6 +63,11 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $< $@
quiet_cmd_binfile = BINFILE $@
cmd_binfile = $(SHELL) $(srctree)/tools/binfile $(BINFILE_FLAGS) $@ $(2)
+# gzip
+quiet_cmd_gzip = GZIP $@
+cmd_gzip = \
+ cat $(real-prereqs) | gzip -n -f -9 > $@
+
# Figure out what we need to build from the various variables
# ===========================================================================
diff --git a/xen/common/Makefile b/xen/common/Makefile
index 46049eac35..f45f19c391 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -78,13 +78,13 @@ obj-$(CONFIG_NEEDS_LIBELF) += libelf/
obj-$(CONFIG_HAS_DEVICE_TREE) += libfdt/
CONF_FILE := $(if $(patsubst
/%,,$(KCONFIG_CONFIG)),$(objtree)/)$(KCONFIG_CONFIG)
-$(obj)/config.gz: $(CONF_FILE)
- gzip -n -c $< >$@
+$(obj)/config.gz: $(CONF_FILE) FORCE
+ $(call if_changed,gzip)
+
+targets += config.gz
$(obj)/config_data.o: $(obj)/config.gz
$(obj)/config_data.S: $(srctree)/tools/binfile FORCE
$(call if_changed,binfile,$(obj)/config.gz xen_config_data)
targets += config_data.S
-
-clean-files := config.gz
--
Anthony PERARD
|