From mboxrd@z Thu Jan 1 00:00:00 1970 From: Horms Subject: Re: [PATCH 11/11] build: Don't assume that mkbuildtree is executable Date: Thu, 13 Apr 2006 11:22:21 +0900 Message-ID: <20060413022220.GA31092@verge.net.au> References: <20060410022914.15477.13677.sendpatchset@tabatha.lab.ultramonkey.org> <20060410023009.15477.66080.sendpatchset@tabatha.lab.ultramonkey.org> <20060411012324.GA5979@verge.net.au> <006d95f04460cc89da1845d12d8a16f7@cl.cam.ac.uk> <20060411085031.GJ17513@verge.net.au> <44c763b0817dc86644cb1036123b6e20@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Return-path: Content-Disposition: inline In-Reply-To: <44c763b0817dc86644cb1036123b6e20@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: Magnus Damm , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, Apr 11, 2006 at 10:23:39AM +0100, Keir Fraser wrote: > > On 11 Apr 2006, at 09:50, Horms wrote: > > >>I think all the scripts currently specify /bin/bash. You could define > >>SHELL or SH in Config.mk, default to /bin/bash, and use that variable > >>in place of 'sh'. > > > >Understood, if they are indeed all using /bin/bash at the moment. It > >seems as well to just specify bash. It can be made more flexible if the > >need arises. Here is an updated patch. > > Let's not risk any regressions: it should be /bin/bash, and apart from > the configurability argument it's also cleaner imo to define a wrapper > variable for /bin/bash in Config.mk. Understood -- Horms build: Don't assume that mkbuildtree is executable In some cases, say for instance for some bizarre reason the tree was checked out of CVS, which doesn't necessarily store file permissions, mkbuildtree may not be executable. I had trouble deciding between chmoding mkbuildtree, which changes the tree, and running sh mkbuildtree, which assumes its a shell script. I settled on the latter. As all the scripts currently specify /bin/bash, it is used, rather than sh which was in the original version of this patch. This can be overridden by setting MKBUILD_SHELL in the environment. MKBUILD_SHELL was chosen over SHELL as the latter has special significance within make. Signed-Off-By: Horms Config.mk | 2 ++ Makefile | 3 +++ buildconfigs/Rules.mk | 8 ++++++-- buildconfigs/mk.linux-2.6-xen | 4 ++-- linux-2.6-xen-sparse/mkbuildtree | 10 ++++++---- tools/debugger/gdb/gdbbuild | 3 ++- tools/misc/xen-clone | 5 ++++- 7 files changed, 25 insertions(+), 10 deletions(-) --- x/Config.mk +++ x/Config.mk @@ -92,4 +92,6 @@ XENSTAT_XENTOP ?= y VTPM_TOOLS ?= n +MKBUILD_SHELL ?= /bin/bash + -include $(XEN_ROOT)/.config --- x/Makefile +++ x/Makefile @@ -172,6 +172,9 @@ help: @echo ' install into prefix/lib/python' @echo ' instead of /lib/python' @echo ' true if set to non-empty value, false otherwise' + @echo ' MKBUILD_SHELL' + @echo ' - shell used to invoke various mkbuild scripts' + @echo ' default is /bin/bash' # Use this target with extreme care! .PHONY: uninstall --- x/buildconfigs/Rules.mk +++ x/buildconfigs/Rules.mk @@ -99,14 +99,18 @@ endif linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref rm -rf tmp-$@ cp -al $( $@ || true rm -rf tmp-$@ %-xen.patch: ref-%/.valid-ref rm -rf tmp-$@ cp -al $( $@ || true rm -rf tmp-$@ --- x/buildconfigs/mk.linux-2.6-xen +++ x/buildconfigs/mk.linux-2.6-xen @@ -22,8 +22,8 @@ $(LINUX_DIR)/include/linux/autoconf.h: r rm -rf $(LINUX_DIR) cp -al $(