From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH] xen/build: Remove hacked up version of figlet Date: Thu, 26 Sep 2013 16:46:06 +0100 Message-ID: <524456BE.7050307@citrix.com> References: <1379001104-21867-1-git-send-email-andrew.cooper3@citrix.com> <5232F37D02000078000F2FBB@nat28.tlf.novell.com> <1379064645.19256.11.camel@kazak.uk.xensource.com> <5232F9B702000078000F300F@nat28.tlf.novell.com> <1379065585.19256.12.camel@kazak.uk.xensource.com> <21042.58891.311204.760237@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VPDlc-0003Ax-5w for xen-devel@lists.xenproject.org; Thu, 26 Sep 2013 15:46:12 +0000 In-Reply-To: <21042.58891.311204.760237@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: xen-devel , KeirFraser , Ian Campbell , Jan Beulich , Tim Deegan List-Id: xen-devel@lists.xenproject.org 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