[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 11/11] build: Don't assume that mkbuildtree is executable



# HG changeset patch
# User Horms <horms@xxxxxxxxxxxx>
# Node ID f69f52013d13de62aa66bebfbab511ccebbfe222
# Parent  491d06219ffdc9e9b99a483fe948970b75d52e06
build: Don't assume that mkbuildtree is executable

In some cases, say for instance for some bizzare reason
the tree was checked out of CVS, which doens't neccessarily
store file permissions, mkbuildtree may not be executable.

I couldn't decide btween chmoding mkbuildtree, which changes
the tree, and running sh mkbuildtree, which assumes its a shell
script. I settled on the latter.

Signed-Off-By: Horms <horms@xxxxxxxxxxxx>

diff -r 491d06219ffd -r f69f52013d13 buildconfigs/Rules.mk
--- a/buildconfigs/Rules.mk     Thu Mar 30 15:16:40 2006 +0900
+++ b/buildconfigs/Rules.mk     Thu Mar 30 15:21:11 2006 +0900
@@ -121,14 +121,14 @@ linux-2.6-xen.patch: ref-linux-$(LINUX_V
 linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref
        rm -rf tmp-$@
        cp -al $(<D) tmp-$@
-       ( cd linux-2.6-xen-sparse && ./mkbuildtree ../tmp-$@ )  
+       ( cd linux-2.6-xen-sparse && sh ./mkbuildtree ../tmp-$@ )       
        diff -Nurp $(<D) tmp-$@ > $@ || true
        rm -rf tmp-$@
 
 %-xen.patch: ref-%/.valid-ref
        rm -rf tmp-$@
        cp -al $(<D) tmp-$@
-       ( cd $*-xen-sparse && ./mkbuildtree ../tmp-$@ ) 
+       ( cd $*-xen-sparse && sh ./mkbuildtree ../tmp-$@ )      
        diff -Nurp $(<D) tmp-$@ > $@ || true
        rm -rf tmp-$@
 
diff -r 491d06219ffd -r f69f52013d13 buildconfigs/mk.linux-2.6-xen
--- a/buildconfigs/mk.linux-2.6-xen     Thu Mar 30 15:16:40 2006 +0900
+++ b/buildconfigs/mk.linux-2.6-xen     Thu Mar 30 15:21:11 2006 +0900
@@ -23,8 +23,8 @@ build: $(LINUX_DIR)/include/linux/autoco
        rm -rf $(LINUX_DIR)
        cp -al $(<D) $(LINUX_DIR)
        # Apply arch-xen patches
-       ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
-          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
+       ( cd linux-$(LINUX_SERIES)-xen-sparse && \
+          LINUX_ARCH=$(LINUX_ARCH) sh ./mkbuildtree ../$(LINUX_DIR) )
        # Re-use config from install dir if one exits else use default config
        CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' 
$(LINUX_DIR)/Makefile); \
        [ -r 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
diff -r 491d06219ffd -r f69f52013d13 linux-2.6-xen-sparse/mkbuildtree
--- a/linux-2.6-xen-sparse/mkbuildtree  Thu Mar 30 15:16:40 2006 +0900
+++ b/linux-2.6-xen-sparse/mkbuildtree  Thu Mar 30 15:21:11 2006 +0900
@@ -90,8 +90,8 @@ RS=$DESTPATH
 RS=$DESTPATH
 
 # Arch-specific pre-processing
-if [ -x arch/${LINUX_ARCH}/xen-mkbuildtree-pre ]; then
-       arch/${LINUX_ARCH}/xen-mkbuildtree-pre
+if [ -e arch/${LINUX_ARCH}/xen-mkbuildtree-pre ]; then
+       sh arch/${LINUX_ARCH}/xen-mkbuildtree-pre
 fi
 
 # Remove old copies of files and directories at the destination
@@ -115,6 +115,6 @@ relative_lndir ../../../${RS}/../xen/inc
 
 # Arch-specific post-processing
 cd ${AD}
-if [ -x arch/${LINUX_ARCH}/xen-mkbuildtree-post ]; then
-       arch/${LINUX_ARCH}/xen-mkbuildtree-post
+if [ -e arch/${LINUX_ARCH}/xen-mkbuildtree-post ]; then
+       sh arch/${LINUX_ARCH}/xen-mkbuildtree-post
 fi
diff -r 491d06219ffd -r f69f52013d13 tools/debugger/gdb/gdbbuild
--- a/tools/debugger/gdb/gdbbuild       Thu Mar 30 15:16:40 2006 +0900
+++ b/tools/debugger/gdb/gdbbuild       Thu Mar 30 15:21:11 2006 +0900
@@ -7,7 +7,7 @@ tar xjf gdb-6.2.1.tar.bz2
 tar xjf gdb-6.2.1.tar.bz2
 
 cd gdb-6.2.1-xen-sparse
-./mkbuildtree ../gdb-6.2.1
+sh ./mkbuildtree ../gdb-6.2.1
 
 cd ..
 mkdir gdb-6.2.1-linux-i386-xen
diff -r 491d06219ffd -r f69f52013d13 tools/misc/xen-clone
--- a/tools/misc/xen-clone      Thu Mar 30 15:16:40 2006 +0900
+++ b/tools/misc/xen-clone      Thu Mar 30 15:21:11 2006 +0900
@@ -113,7 +113,7 @@ else
 
  # Turn linux into xenolinux then build it
  cd xenolinux-${LINUX_VER}-sparse
- ./mkbuildtree ../../linux-${LINUX_VER}
+ sh ./mkbuildtree ../../linux-${LINUX_VER}
  cd ../..
  mv linux-${LINUX_VER} xenolinux-${LINUX_VER}
  cd xenolinux-${LINUX_VER}

-- 
Horms

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.