diff options
author | cl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk> | 2005-03-09 00:29:54 +0000 |
---|---|---|
committer | cl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk> | 2005-03-09 00:29:54 +0000 |
commit | 9c9ae3ef3e5238fad3c17a98574c35fe433ca5ad (patch) | |
tree | beb7d17e3412e904bad8043d32b748fc3f172701 /netbsd-2.0-xen-sparse | |
parent | 26c56cda54c09ff55ef4eabb1c47da66bffbabf5 (diff) | |
download | xen-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>
Diffstat (limited to 'netbsd-2.0-xen-sparse')
-rwxr-xr-x | netbsd-2.0-xen-sparse/mkbuildtree | 26 |
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 |