summaryrefslogtreecommitdiff
path: root/gcc/configure.frag
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>1997-06-27 23:55:57 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>1997-06-27 23:55:57 +0000
commit9cf8d34db811594dcf80edf5add9daa9eb8afce9 (patch)
tree6ef867c6d594ffb33d449a69168161fd7a772d5b /gcc/configure.frag
parentf97d988c76e09db08415cfd5d31b12a9c25913ba (diff)
downloadgcc-9cf8d34db811594dcf80edf5add9daa9eb8afce9.tar.gz
Rewrite.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@14360 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.frag')
-rw-r--r--gcc/configure.frag61
1 files changed, 17 insertions, 44 deletions
diff --git a/gcc/configure.frag b/gcc/configure.frag
index 56a47fc5189..7eb2f40c930 100644
--- a/gcc/configure.frag
+++ b/gcc/configure.frag
@@ -21,56 +21,29 @@
#Boston, MA 02111-1307, USA.
# First parameter is the source directory, second is list of subdirectories
+
savesrcdir=$1
savesubdirs=$2
+
+# First ensure the language build subdirectories exist.
+
for subdir in . $savesubdirs
do
- oldsrcdir=$savesrcdir
+ if [ $subdir != . ]
+ then
+ test -d $subdir || mkdir $subdir
+ fi
+done
- rm -f Make-lang
- touch Make-lang
+# Now copy each language's Make-lang.in file to Make-lang.
- # Re-adjust the path
- case $oldsrcdir in
- /*)
- case $subdir in
- .)
- srcdir=$oldsrcdir
- ;;
- *)
- srcdir=$oldsrcdir/$subdir
- ;;
- esac
- ;;
- *)
- case $subdir in
- .)
- ;;
- *)
- oldsrcdir=../${oldsrcdir}
- srcdir=$oldsrcdir/$subdir
- ;;
- esac
- ;;
- esac
- mainsrcdir=$oldsrcdir
- STARTDIR=`pwd`
- test -d $subdir || mkdir $subdir
- cd $subdir
+rm -f Make-lang
+touch Make-lang
- # If this is the top level Makefile, add the language fragments.
- if [ $subdir = . ]
+for subdir in . $savesubdirs
+do
+ if [ $subdir != . ]
then
- for s in .. $savesubdirs
- do
- if [ $s != ".." ]
- then
- cat ${mainsrcdir}/$s/Make-lang.in >> Make-lang
- fi
- done
+ cat $savesrcdir/$subdir/Make-lang.in >> Make-lang
fi
-
- cd $STARTDIR
-done # end of current-dir SUBDIRS loop
-
-srcdir=$savesrcdir
+done