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@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Anthony PERARD authored and Jan Beulich committed 2021-08-10 09:27:13 +02:00
1 parent 2b45ff6030
commit 44b9ec5a5c
1 file changed
+13 -7
+13 -7
View File
@@ -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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.