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

[PATCH] build: adjust include/xen/compile.h generation


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 11 Jan 2022 15:16:17 +0100
  • 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=SXIayTdzU3xVDaLPRjSHx+LSZzd1LV8a706FusiPwlw=; b=Avni3E9DT5Gjbxv6O81BYRKJFdf3pL48Inon4KH8PGaVbrJhPsbmAFPWTXEDGLPjGV9PIIzdzabteZTK+FKJZVRk7ehMxBBI02HKslzJO403tcbDhwk77X5CwVY9oH7EOGN0ECix94E9Pff4LK/IstxCD9nHx5MrgQWls5B1gX8BRIas9H5gIkGIJOgsSiOSqe2wJbhMYlLXu2Y5YIrVFgQ4xXLYKe4wJx3iI3TO3V2eMElR2FsxwTcrnJRvK5klOrobZT3rdk+jCH28H/5unNtIvD+QUBRIll48tMlABVHrQvZAEwAL8Fo3Miyf7rF+XbTtV1fhMClWFzbsQDZO9g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UxUHu/RnpUEMMGqSOERUBeneXLd8yS9Y51piRJA7ZLhqc+KkHBfSlyMMnFmqeD+WNh1oFrzgs2fMiJEfjDZyiu9MKrkr6t8bNKTgNwMP8FiuKCt70jdJLXSez2jOF266U2FX+08leg/z2bOw7WV/ziQAgYroL/qHuSicpsrzcuA9cuTF7104wS75UGVvFfdXflu2j9v9FY1gsGE+6LeVx3IQSmL8i/UkZKAwl43IbxeRmwgfyWGlM9LjbahDb5DrVOHgwsWfqfbXrD4K/8SJB88IWaHO6QKcqSlVZYRxEW0R3mJ/ZqGT+czNXE8/pAt5ywDiWFgvH6HyN3rhNsapZA==
  • 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>, Anthony Perard <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Tue, 11 Jan 2022 14:16:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Prior to 19427e439e01 ("build: generate "include/xen/compile.h" with
if_changed") running "make install-xen" as root would not have printed
the banner under normal circumstances. Its printing would instead have
indicated that something was wrong (or during a normal build the lack
of printing would do so).

Further aforementioned change had another undesirable effect, which I
didn't notice during review: Originally compile.h would have been
re-generated (and final binaries re-linked) when its dependencies were
updated after an earlier build. This is no longer the case now, which
means that if some other file also was updated, then the re-build done
during "make install-xen" would happen with a stale compile.h (as its
updating is suppressed in this case).

Restore the earlier behavior for both aspects.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
An alternative to removing the target would be to replace "! -r $@" by
"-n '$?'" in the shell "if", but that would cause unhelpful alteration
of what gets recorded in include/xen/.compile.h.cmd. (The command
normally changes every time anyway, due to the inclusion of
$(XEN_BUILD_TIME), but I consider that different from varying the
conditions of the "if".)

--- a/xen/Makefile
+++ b/xen/Makefile
@@ -424,6 +424,7 @@ targets += .banner
 quiet_cmd_compile.h = UPD     $@
 define cmd_compile.h
     if [ ! -r $@ -o -O $@ ]; then \
+       cat .banner; \
        sed -e 's/@@date@@/$(XEN_BUILD_DATE)/g' \
            -e 's/@@time@@/$(XEN_BUILD_TIME)/g' \
            -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
@@ -441,7 +442,7 @@ define cmd_compile.h
 endef
 
 include/xen/compile.h: include/xen/compile.h.in .banner FORCE
-       @cat .banner
+       $(if $(filter-out FORCE,$?),rm -fv $@)
        $(call if_changed,compile.h)
 
 targets += include/xen/compile.h




 


Rackspace

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