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

[xen master] build: rework .banner generation



commit 44b9ec5a5c9c7a32cd75efd09e5693016b78e5c3
Author:     Anthony PERARD <anthony.perard@xxxxxxxxxx>
AuthorDate: Tue Aug 10 09:27:13 2021 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Aug 10 09:27:13 2021 +0200

    build: rework .banner generation
    
    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>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/Makefile | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/xen/Makefile b/xen/Makefile
index 8023680ffb..94e8371826 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -378,13 +378,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
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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