ia64/xen-unstable
changeset 17493:b2e28707ecbb
Cache figlet output across builds, and provide src-tarball target
which creates figlet output and then deletes figlet itself (which is
not licensed under GPL).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
which creates figlet output and then deletes figlet itself (which is
not licensed under GPL).
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Mon Apr 21 20:08:29 2008 +0100 (2008-04-21) |
parents | 8d20c24238ad |
children | b3e53e17d87a |
files | .hgignore Makefile xen/Makefile xen/tools/Makefile |
line diff
1.1 --- a/.hgignore Mon Apr 21 17:41:29 2008 +0100 1.2 +++ b/.hgignore Mon Apr 21 20:08:29 2008 +0100 1.3 @@ -243,6 +243,7 @@ 1.4 ^tools/xm-test/lib/XmTestLib/config.py$ 1.5 ^tools/xm-test/lib/XmTestReport/xmtest.py$ 1.6 ^tools/xm-test/tests/.*\.test$ 1.7 +^xen/\.banner.*$ 1.8 ^xen/BLOG$ 1.9 ^xen/System.map$ 1.10 ^xen/TAGS$
2.1 --- a/Makefile Mon Apr 21 17:41:29 2008 +0100 2.2 +++ b/Makefile Mon Apr 21 20:08:29 2008 +0100 2.3 @@ -122,6 +122,13 @@ distclean: 2.4 .PHONY: mrproper 2.5 mrproper: distclean 2.6 2.7 +# Prepare for source tarball 2.8 +.PHONY: src-tarball 2.9 +src-tarball: distclean 2.10 + $(MAKE) -C xen .banner 2.11 + rm -rf xen/tools/figlet 2.12 + $(MAKE) -C xen distclean 2.13 + 2.14 .PHONY: help 2.15 help: 2.16 @echo 'Installation targets:'
3.1 --- a/xen/Makefile Mon Apr 21 17:41:29 2008 +0100 3.2 +++ b/xen/Makefile Mon Apr 21 20:08:29 2008 +0100 3.3 @@ -44,6 +44,7 @@ build install debug clean distclean csco 3.4 $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean 3.5 rm -f include/asm *.o $(TARGET)* *~ core 3.6 rm -f include/asm-*/asm-offsets.h 3.7 + [ -d tools/figlet ] && rm -f .banner* 3.8 3.9 .PHONY: _distclean 3.10 _distclean: clean 3.11 @@ -70,8 +71,14 @@ delete-unfresh-files: 3.12 rm -f include/xen/compile.h; \ 3.13 fi 3.14 3.15 +.banner: Makefile 3.16 + $(MAKE) -C tools 3.17 + @tools/figlet/figlet -d tools/figlet Xen $(XEN_FULLVERSION) 2>$@2 >$@1 3.18 + @cat $@1 $@2 >$@ 3.19 + @rm -f $@1 $@2 3.20 + 3.21 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation. 3.22 -include/xen/compile.h: include/xen/compile.h.in 3.23 +include/xen/compile.h: include/xen/compile.h.in .banner 3.24 @sed -e 's/@@date@@/$(shell LC_ALL=C date)/g' \ 3.25 -e 's/@@time@@/$(shell LC_ALL=C date +%T)/g' \ 3.26 -e 's/@@whoami@@/$(USER)/g' \ 3.27 @@ -83,7 +90,8 @@ include/xen/compile.h: include/xen/compi 3.28 -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \ 3.29 -e 's!@@changeset@@!$(shell ((hg parents --template "{date|date} {rev}:{node|short}" >/dev/null && hg parents --template "{date|date} {rev}:{node|short}") || echo "unavailable") 2>/dev/null)!g' \ 3.30 < include/xen/compile.h.in > $@.new 3.31 - tools/figlet/figlet -d tools/figlet Xen $(XEN_FULLVERSION) >> $@.new 3.32 + @grep \" .banner >> $@.new 3.33 + @grep -v \" .banner 3.34 @mv -f $@.new $@ 3.35 3.36 include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
4.1 --- a/xen/tools/Makefile Mon Apr 21 17:41:29 2008 +0100 4.2 +++ b/xen/tools/Makefile Mon Apr 21 20:08:29 2008 +0100 4.3 @@ -4,12 +4,12 @@ include $(XEN_ROOT)/Config.mk 4.4 4.5 .PHONY: default 4.6 default: 4.7 - $(MAKE) -C figlet 4.8 + [ -d figlet ] && $(MAKE) -C figlet 4.9 $(MAKE) symbols 4.10 4.11 .PHONY: clean 4.12 clean: 4.13 - $(MAKE) -C figlet clean 4.14 + [ -d figlet ] && $(MAKE) -C figlet clean 4.15 rm -f *.o symbols 4.16 4.17 symbols: symbols.c