|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/build: Remove hacked up version of figlet
On 13/09/13 11:16, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH] xen/build: Remove hacked up version of
> figlet"):
>> On Fri, 2013-09-13 at 10:40 +0100, Jan Beulich wrote:
> ...
>>> I'd be more agreeable to this if the whole
>>> change wasn't just to make a tool happy...
>> This is true...
> No, it isn't. That's just what prompted us to look at this.
>
> When Ian C told me offline about this embedded copy of figlet I said
> WTF?!
>
> We certainly shouldn't be carrying a hacked up version of figlet in
> the Xen tree. If there are systems without figlet then we should make
> its use conditional, as suggested. Those systems' users can then
> (a) install figlet by hand (b) live without figleted banners (c) get
> this apparently useful utility into their distro.
>
> Ian.
Coverity aside, we really shouldn't have a hacked up version of figlet here.
How about this (just the makefile changes to safe sending a huge patch
again)? It causes a lack of figlet in the build environment not to be fatal.
~Andrew
-----8<-----
diff --git a/xen/Makefile b/xen/Makefile
index 597972d..1ea2717 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -86,7 +86,7 @@ _clean: delete-unfresh-files
$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean
rm -f include/asm *.o $(TARGET) $(TARGET).gz $(TARGET)-syms *~ core
rm -f include/asm-*/asm-offsets.h
- [ -d tools/figlet ] && rm -f .banner*
+ rm -f .banner
.PHONY: _distclean
_distclean: clean
@@ -114,10 +114,12 @@ delete-unfresh-files:
fi
.banner: Makefile
- $(MAKE) -C tools
- @tools/figlet/figlet -d tools/figlet Xen $(XEN_FULLVERSION)
2>$@2 >$@1
- @cat $@1 $@2 >$@
- @rm -f $@1 $@2
+ @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 $@
# compile.h contains dynamic build info. Rebuilt on every 'make'
invocation.
include/xen/compile.h: include/xen/compile.h.in .banner
@@ -132,8 +134,8 @@ include/xen/compile.h: include/xen/compile.h.in .banner
-e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
-e 's!@@changeset@@!$(shell tools/scmversion $(XEN_ROOT) ||
echo "unavailable")!g' \
< include/xen/compile.h.in > $@.new
- @grep \" .banner >> $@.new
- @grep -v \" .banner
+ @cat .banner
+ @$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
@mv -f $@.new $@
include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |