aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-03-09 00:29:54 +0000
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>2005-03-09 00:29:54 +0000
commit9c9ae3ef3e5238fad3c17a98574c35fe433ca5ad (patch)
treebeb7d17e3412e904bad8043d32b748fc3f172701
parent26c56cda54c09ff55ef4eabb1c47da66bffbabf5 (diff)
downloadxen-9c9ae3ef3e5238fad3c17a98574c35fe433ca5ad.tar.gz
xen-9c9ae3ef3e5238fad3c17a98574c35fe433ca5ad.tar.bz2
xen-9c9ae3ef3e5238fad3c17a98574c35fe433ca5ad.zip
bitkeeper revision 1.1159.258.29 (422e4382uaLzLWWGJwNl_pq0d8dMog)
Support Xen-ifying a complete NetBSD source tree. Signed-off-by: Christian Limpach <cl@NetBSD.org>
-rwxr-xr-xnetbsd-2.0-xen-sparse/mkbuildtree26
1 files changed, 20 insertions, 6 deletions
diff --git a/netbsd-2.0-xen-sparse/mkbuildtree b/netbsd-2.0-xen-sparse/mkbuildtree
index 0d5330d115..ef85a8922a 100755
--- a/netbsd-2.0-xen-sparse/mkbuildtree
+++ b/netbsd-2.0-xen-sparse/mkbuildtree
@@ -85,6 +85,9 @@ popd >/dev/null
# Get absolute path to the source directory
AS=`pwd`
+# Get name of sparse directory
+SDN=$(basename $AS)
+
# Get path to source, relative to destination
abs_to_rel ${AD} ${AS}
RS=$DESTPATH
@@ -96,12 +99,23 @@ for i in `find . -type f -o -type l` ; do rm -f ${AD}/${i#./} ; done
cd ${AD}
# Remove old symlinks
-for i in `find . -type l`; do rm -f $i; done
-
-# Create symlinks of files and directories which exist in the sparse source
-relative_lndir ${RS}
-rm -f mkbuildtree
-
+find sys -type l | while read f
+do
+ case $(readlink $f) in
+ */$SDN/*)
+ rm -f $f
+ ;;
+ esac
+done
+
+if [ -f ${AD}/BUILDING ]; then
+ # Create symlinks of files and directories which exist in the sparse source
+ (cd sys && relative_lndir ../${RS}/sys)
+else
+ # Create symlinks of files and directories which exist in the sparse source
+ relative_lndir ${RS}
+ rm -f mkbuildtree
+fi
# Create links to the shared definitions of the Xen interface
rm -rf ${AD}/sys/arch/xen/include/xen-public