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

Re: [XEN PATCH v7 16/51] build: generate "include/xen/compile.h" with if_changed


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 7 Oct 2021 16:55:01 +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=8qABAAvH1Bi4IVa+09q/nwNE1yzSoaRudcTcKA+srxQ=; b=bx00YxHIJ0aGs30h40/KHsJPDQP1EqhXZWVgevQvS/oD03JtsWqFlLReeXwBtx1LxEuEZhEARI+oGAvDms7wjC+N4th1E32S/yN+FV/s2MNQFo6d100y98l2rsv9+AAWc3qNVascrsWnieWG0aSctVM8wJYG9ZMz3THlvwtpJh2/A7AsCpdt5Bc4/6lZ3zVT8QEv6q30RwpXZ4gBW3dxE1eqlj5AnaklFXeFhKQgvYrWU9gwrZk0hEkdYASpGVgi07ANZiVajKxHwa/4K1eZvrvXAnZsBVw2bB7M4VtAYkDkhmz5PlNhtZXh+YXLgAxJN53ssG1KVToOI3dc0JWWVg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j61IafpnuOU1Zw1i3w5e9Mp+OkU26AeNfQy2e6MQCilqhPscW+ZmTaBvO3NjZiju1EFAeZDcb0XbUIe5uE7R6RdNeSnaQdynf9mmXoQ9k13S5RqqHR0cVKotNzORqQHPyjECUGeO8TelXkZwX/4sD9ZM+6l1VycCyxKmZQ4I4YjLeMe8YORgNrssU8ME56bq3+QhBbrFK0MRJD5iZEKBGzOug/NJk/+nclnczzRPEwztL2XH7fdOiNFbKEGe9MrnDZIOi4IGTar3z9Z8wzLmnbeW7Hi0PUkSECRAerTUZvOkdRed3mFJ9S8G9Bpx/e6fwzrKQcs4h2lMjxpLdUvmBw==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 07 Oct 2021 14:55:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.08.2021 12:50, Anthony PERARD wrote:
> --- a/.gitignore
> +++ b/.gitignore
> @@ -332,7 +332,6 @@ xen/include/compat/*
>  xen/include/config/
>  xen/include/generated/
>  xen/include/public/public
> -xen/include/xen/*.new

While this indeed looks to only have been here for compile.h, I'm
not convinced it is a good idea to delete the entry here. Does it
cause any harm if left in place?

> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -351,7 +351,7 @@ _debug:
>       $(OBJDUMP) -D -S $(TARGET)-syms > $(TARGET).s
>  
>  .PHONY: _clean
> -_clean: delete-unfresh-files
> +_clean:
>       $(MAKE) -C tools clean
>       $(MAKE) $(clean) include
>       $(MAKE) $(clean) common
> @@ -368,7 +368,7 @@ _clean: delete-unfresh-files
>               -o -name "*.gcno" -o -name ".*.cmd" -o -name "lib.a" \) -exec 
> rm -f {} \;
>       rm -f include/asm $(TARGET) $(TARGET).gz $(TARGET).efi 
> $(TARGET).efi.map $(TARGET)-syms $(TARGET)-syms.map *~ core
>       rm -f asm-offsets.s arch/*/include/asm/asm-offsets.h
> -     rm -f .banner
> +     rm -f .banner include/xen/compile.h

Isn't this redundant with ...

> @@ -425,10 +419,16 @@ include/xen/compile.h: include/xen/compile.h.in .banner
>           -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
>           -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
>           -e 's!@@changeset@@!$(shell tools/scmversion $(XEN_ROOT) || echo 
> "unavailable")!g' \
> -         < include/xen/compile.h.in > $@.new
> +         < $< > $(dot-target).tmp; \
> +     sed -rf tools/process-banner.sed < .banner >> $(dot-target).tmp; \
> +     mv -f $(dot-target).tmp $@; \
> +    fi
> +endef
> +
> +include/xen/compile.h: include/xen/compile.h.in .banner FORCE
>       @cat .banner
> -     @sed -rf tools/process-banner.sed < .banner >> $@.new
> -     @mv -f $@.new $@
> +     $(call if_changed,compile.h)
> +targets += include/xen/compile.h

... this? I would have hoped that $(targets) is included in the
generic cleaning logic ...

Jan




 


Rackspace

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