ia64/xen-unstable

changeset 1167:d9faebfb1422

bitkeeper revision 1.782.1.1 (40519955rMBgGJDIn0x9xwhUTOT17w)

mkbuildtree:
Fix mkbuildtree script. No longer depend on broken lndir-rel.
.del-lndir-rel~746e79fa104b53af:
Delete: xenolinux-2.4.25-sparse/lndir-rel
author kaf24@scramble.cl.cam.ac.uk
date Fri Mar 12 11:04:53 2004 +0000 (2004-03-12)
parents 240abd842f1a
children 9f76e6bae78e
files .rootkeys xenolinux-2.4.25-sparse/lndir-rel xenolinux-2.4.25-sparse/mkbuildtree
line diff
     1.1 --- a/.rootkeys	Thu Mar 11 15:54:01 2004 +0000
     1.2 +++ b/.rootkeys	Fri Mar 12 11:04:53 2004 +0000
     1.3 @@ -657,7 +657,6 @@ 3e5a4e68W_hpMlM3u_-QOKMp3gzcwQ xenolinux
     1.4  3e5a4e68TJJavrunYwTAnLRSBxSYqQ xenolinux-2.4.25-sparse/kernel/panic.c
     1.5  3f9d4b44247udoqWEgFkaHiWv6Uvyg xenolinux-2.4.25-sparse/kernel/time.c
     1.6  401c059bjLBFYHRD4Py2uM3eA1D4zQ xenolinux-2.4.25-sparse/kernel/timer.c
     1.7 -3eba8f878XjouY21EkQBXwYBsPsipQ xenolinux-2.4.25-sparse/lndir-rel
     1.8  3e6e7c1efbQe93xCvOpOVCnXTMmQ5w xenolinux-2.4.25-sparse/mkbuildtree
     1.9  3e5a4e68GxCIaFH4sy01v1wjapetaA xenolinux-2.4.25-sparse/mm/memory.c
    1.10  3f108af5VxPkLv13tXpXgoRKALQtXQ xenolinux-2.4.25-sparse/mm/mprotect.c
     2.1 Binary file xenolinux-2.4.25-sparse/lndir-rel has changed
     3.1 --- a/xenolinux-2.4.25-sparse/mkbuildtree	Thu Mar 11 15:54:01 2004 +0000
     3.2 +++ b/xenolinux-2.4.25-sparse/mkbuildtree	Fri Mar 12 11:04:53 2004 +0000
     3.3 @@ -49,15 +49,39 @@ abs_to_rel ()
     3.4  	[ "${DESTPATH##*[^/]}" = "/" ] && DESTPATH=${DESTPATH%?}
     3.5  }
     3.6  
     3.7 +# relative_lndir <target_dir>
     3.8 +# Creates a tree of symlinks in the current working directory that mirror
     3.9 +# real files in <target_dir>. <target_dir> should be relative to the current
    3.10 +# working directory. Symlinks in <target_dir> are ignored. Source-control files
    3.11 +# are ignored.
    3.12 +relative_lndir ()
    3.13 +{
    3.14 +  local SYMLINK_DIR REAL_DIR pref i j
    3.15 +  SYMLINK_DIR=$PWD
    3.16 +  REAL_DIR=$1
    3.17 +  (
    3.18 +  cd $REAL_DIR
    3.19 +  for i in `find . -type d | grep -v SCCS`; do
    3.20 +    [ -d $SYMLINK_DIR/$i ] || mkdir -p $SYMLINK_DIR/$i
    3.21 +    (
    3.22 +    cd $i
    3.23 +    pref=`echo $i | sed -e 's#/[^/]*#../#g' -e 's#^\.##'`
    3.24 +    for j in `find . -type f -maxdepth 1`; do
    3.25 +      ln -sf ${pref}${REAL_DIR}/$i/$j ${SYMLINK_DIR}/$i/$j
    3.26 +    done
    3.27 +    )
    3.28 +  done
    3.29 +  )
    3.30 +}
    3.31  
    3.32  [ "$1" == "" ] && { echo "Syntax: $0 <linux tree to xenify>"; exit 1; }
    3.33  
    3.34  # Get absolute path to the destination directory
    3.35  pushd . >/dev/null
    3.36  cd ${1}
    3.37 -AD=`pwd`
    3.38 +AD=$PWD
    3.39  popd >/dev/null
    3.40 -
    3.41 +  
    3.42  # Get absolute path to the source directory
    3.43  AS=`pwd`
    3.44  
    3.45 @@ -71,9 +95,12 @@ for i in `find . -type f -o -type l` ; d
    3.46  # We now work from the destination directory
    3.47  cd ${AD}
    3.48  
    3.49 +# Remove old symlinks
    3.50 +for i in `find . -type l`; do rm -f $i; done
    3.51 +
    3.52  # Create symlinks of files and directories which exist in the sparse source
    3.53 -${AS}/lndir-rel -silent ${RS}
    3.54 -rm -f mkbuildtree lndir-rel
    3.55 +relative_lndir ${RS}
    3.56 +rm -f mkbuildtree
    3.57  
    3.58  ## There are a whole bunch of special symlinks, mostly for files
    3.59  ## which are identical in the i386 and xeno-i386 architecture-dependent
    3.60 @@ -83,7 +110,7 @@ rm -f mkbuildtree lndir-rel
    3.61  rm -rf ${AD}/include/asm-xeno/hypervisor-ifs
    3.62  mkdir  ${AD}/include/asm-xeno/hypervisor-ifs
    3.63  cd     ${AD}/include/asm-xeno/hypervisor-ifs
    3.64 -${AS}/lndir-rel -silent ../../../${RS}/../xen/include/hypervisor-ifs
    3.65 +relative_lndir ../../../${RS}/../xen/include/hypervisor-ifs
    3.66  
    3.67  # The remainder are the i386 -> xeno-i386 links
    3.68  cd ..