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

[XEN PATCH v6 19/31] build: rework .banner generation


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Thu, 1 Jul 2021 15:09:59 +0100
  • Authentication-results: esa1.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>, "Ian Jackson" <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 01 Jul 2021 14:22:01 +0000
  • Ironport-hdrordr: A9a23:CZGT3q1O+8E7RG7SPjPV7gqjBIokLtp133Aq2lEZdPRUGvb3qy nIpoV86faUskdoZJhOo7C90cW7LU80sKQFhLX5Xo3SOzUO2lHYT72KhLGKq1aLdhEWtNQtsZ uIG5IOceEYZmIasS+V2maF+q4bsbu6zJw=
  • Ironport-sdr: NZ/MaMEfgDUzcZbO6KcGdvFFBkHR6NU6p9DlxJ715VT6RLQFJVjuh+XWDqbgfYwIUafNmoXmMD s5GWIkHuy3tIdJLKyBUd38fMpUhl7cgGEMYmMn1ljii3q4QxU/+6/kllIcIZR9FVnHja/7ft2S XfcCt8A1gjJ8Nr70Y062zL0eqCSZwEGMUzGKj44Pw2bwN9tbGbB6R1QkAwNSNffdD5qSKV8yG1 +TwvxqSndDA8dZvxdN/pxcne3QiUmMutVWbk5vMssasw8CCES/aRV+71vb0L7eGqP7O0AgEOUj ODY=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Avoid depending on Makefile but still allow to rebuild the banner when
$(XEN_FULLVERSION) changes.

Also add a dependency on tools/xen.flf, even if not expected to
change.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 xen/Makefile | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/xen/Makefile b/xen/Makefile
index 7e3e4c42d77b..267ae77aef7a 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -399,13 +399,19 @@ delete-unfresh-files:
                rm -f include/xen/compile.h; \
        fi
 
-.banner: Makefile
-       @if which figlet >/dev/null 2>&1 ; then \
-               echo " Xen $(XEN_FULLVERSION)" | figlet -f tools/xen.flf > 
$@.tmp; \
-       else \
-               echo " Xen $(XEN_FULLVERSION)" > $@.tmp; \
-       fi
-       @mv -f $@.tmp $@
+quiet_cmd_banner = BANNER  $@
+define cmd_banner
+    if which figlet >/dev/null 2>&1 ; then \
+       echo " Xen $(XEN_FULLVERSION)" | figlet -f $< > $@.tmp; \
+    else \
+       echo " Xen $(XEN_FULLVERSION)" > $@.tmp; \
+    fi; \
+    mv -f $@.tmp $@
+endef
+
+.banner: tools/xen.flf FORCE
+       $(call if_changed,banner)
+targets += .banner
 
 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
 include/xen/compile.h: include/xen/compile.h.in .banner
-- 
Anthony PERARD




 


Rackspace

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