ia64/xen-unstable

changeset 4025:122ff9689ca1

bitkeeper revision 1.1159.258.29 (422e4382uaLzLWWGJwNl_pq0d8dMog)

Support Xen-ifying a complete NetBSD source tree.
Signed-off-by: Christian Limpach <cl@NetBSD.org>
author cl349@firebug.cl.cam.ac.uk
date Wed Mar 09 00:29:54 2005 +0000 (2005-03-09)
parents d779cc1ad0ae
children 7d30a5399140
files netbsd-2.0-xen-sparse/mkbuildtree
line diff
     1.1 --- a/netbsd-2.0-xen-sparse/mkbuildtree	Wed Mar 09 00:27:17 2005 +0000
     1.2 +++ b/netbsd-2.0-xen-sparse/mkbuildtree	Wed Mar 09 00:29:54 2005 +0000
     1.3 @@ -85,6 +85,9 @@ popd >/dev/null
     1.4  # Get absolute path to the source directory
     1.5  AS=`pwd`
     1.6  
     1.7 +# Get name of sparse directory
     1.8 +SDN=$(basename $AS)
     1.9 +
    1.10  # Get path to source, relative to destination
    1.11  abs_to_rel ${AD} ${AS}
    1.12  RS=$DESTPATH
    1.13 @@ -96,12 +99,23 @@ for i in `find . -type f -o -type l` ; d
    1.14  cd ${AD}
    1.15  
    1.16  # Remove old symlinks
    1.17 -for i in `find . -type l`; do rm -f $i; done
    1.18 +find sys -type l | while read f
    1.19 +do
    1.20 +  case $(readlink $f) in
    1.21 +  */$SDN/*)
    1.22 +    rm -f $f
    1.23 +    ;;
    1.24 +  esac
    1.25 +done
    1.26  
    1.27 -# Create symlinks of files and directories which exist in the sparse source
    1.28 -relative_lndir ${RS}
    1.29 -rm -f mkbuildtree
    1.30 -
    1.31 +if [ -f ${AD}/BUILDING ]; then
    1.32 +  # Create symlinks of files and directories which exist in the sparse source
    1.33 +  (cd sys && relative_lndir ../${RS}/sys)
    1.34 +else
    1.35 +  # Create symlinks of files and directories which exist in the sparse source
    1.36 +  relative_lndir ${RS}
    1.37 +  rm -f mkbuildtree
    1.38 +fi
    1.39  
    1.40  # Create links to the shared definitions of the Xen interface
    1.41  rm -rf ${AD}/sys/arch/xen/include/xen-public