From: Richard Stallman Date: Tue, 5 Jan 1993 02:11:29 +0000 (+0000) Subject: (making dirs and links): If we already made subdirs for a dir foo and foo turns out... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f744b2cecabb75a587af4254f1e213545b507347;p=gcc.git (making dirs and links): If we already made subdirs for a dir foo and foo turns out to be a symlink outside /usr/include... (making dirs and links): If we already made subdirs for a dir foo and foo turns out to be a symlink outside /usr/include, after we have made a dir for it in ./root/, make similar subdirs there. From-SVN: r3091 --- diff --git a/gcc/fixincludes b/gcc/fixincludes index a54f4095fd2..ec8c4ca71bb 100755 --- a/gcc/fixincludes +++ b/gcc/fixincludes @@ -165,6 +165,23 @@ if $LINKS; then dirname=`echo $dirname | sed -e 's|[^/]*/||'` done fi + # Duplicate directory structure created in ${LIB}/$file in new + # root area. + for file2 in $files; do + case $file2 in + $file/.*) + ;; + *) + dupdir=${LIB}/root$x/`echo $file2 | sed -n "s|^${file}/||p"` + echo "Duplicating ${file}'s ${dupdir}" + if [ -d ${dupdir} ] + then true + else + mkdir ${dupdir} + fi + ;; + esac + done rm -fr ${LIB}/$file > /dev/null 2>&1 ln -s ${LIB}/root$x ${LIB}/$file > /dev/null 2>&1 treetops="$treetops $x ${LIB}/root$x"