(making dirs and links): If we already made subdirs for a dir foo and foo turns out...
authorRichard Stallman <rms@gnu.org>
Tue, 5 Jan 1993 02:11:29 +0000 (02:11 +0000)
committerRichard Stallman <rms@gnu.org>
Tue, 5 Jan 1993 02:11:29 +0000 (02:11 +0000)
(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

gcc/fixincludes

index a54f4095fd29ea386801d940b7cf28e28fe92d85..ec8c4ca71bb12f297c73ad156f3f1974592bdee4 100755 (executable)
@@ -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"