[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH 05/15] build: introduce a generic command for gzip


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 24 May 2023 09:17:09 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QaYgCrM4BZ3oLejbA1usdbUF4x0f5gyf5/bJsjpPHUY=; b=M813DkbUcBxXq0GydeA2hdEeqRL1n6pJom6bCHy/zVV43SoOkXzd9ev334UsZifrKLRPqXBV1iVv+FgqbAiE71/4Seej4D7Sa5crV3rWWGlCHWB7Y0W5DcccOC0Leb5qOPJKuZ+wvmSRm+Zfty0Mr/ZJ3i2z01GSbYrrohTuYcgEcSlbwx/pr/1I92naIsMRhm5Xz6ubc0Q6TnGjYUNRJ85bkZdjlaBzrhK8E1oweU/AJbSZk3XVreGkNW6I32KOFbVqQ+TLafiYcPCakvaFkNbcQfbH4sIUJQWrHK2C89y+es7ts8kR9/1MmudQeFB+z19ePv5FEBxBpChGrfuZ4Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HLRbmfC6SI5SUP2Sr34KmLEo90YVSvHrsAkzxyRDWXeNX0nuHyLjwRHsrLygJDpizA6ZTJQBINafseRFoSn9JXqTflz05l+UX83FueHjFmCenpEbdOLz3WW0NyXn3lUe+LTByfOhs91EjeIe4f1wzjSmMp9dEIrj+jz99a2DQNfmMR3FgOR7e6E6zXmuQb75s2kE1olUGWlqFMgPJxTypUjeiYxgufgKIC5L9zZye8xJJdUz9KsyHJRCtTtUXy0sfFhj8ewgpO6ClU1cY7ThsEMS9D+Djy1TixjwqYBBOlJkrG5r8Sw5T80n6MfTx3UmMxM1zuX3G9rrqhu35V6U1g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 24 May 2023 07:17:28 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23.05.2023 18:38, Anthony PERARD wrote:
> Make the gzip command generic and use -9 which wasn't use for
> config.gz. (xen.gz does use -9)

You mention xen.gz here, but you don't make its rule use this new
construct. Is that intentional (and if so, why)? (There we also go
through $@.new, and being consistent in that regard would imo be
desirable as well.)

Jan

> 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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.