Rewrite.
[platform/upstream/gcc.git] / gcc / configure.frag
1 # configure.frag for GNU CC
2 # Process the Makefile fragments from language directories.
3
4 # Copyright (C) 1997 Free Software Foundation, Inc.
5
6 #This file is part of GNU CC.
7
8 #GNU CC is free software; you can redistribute it and/or modify
9 #it under the terms of the GNU General Public License as published by
10 #the Free Software Foundation; either version 2, or (at your option)
11 #any later version.
12
13 #GNU CC is distributed in the hope that it will be useful,
14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #GNU General Public License for more details.
17
18 #You should have received a copy of the GNU General Public License
19 #along with GNU CC; see the file COPYING.  If not, write to
20 #the Free Software Foundation, 59 Temple Place - Suite 330,
21 #Boston, MA 02111-1307, USA.
22
23 # First parameter is the source directory, second is list of subdirectories
24
25 savesrcdir=$1
26 savesubdirs=$2
27
28 # First ensure the language build subdirectories exist.
29
30 for subdir in . $savesubdirs
31 do
32         if [ $subdir != . ]
33         then
34                 test -d $subdir || mkdir $subdir
35         fi
36 done
37
38 # Now copy each language's Make-lang.in file to Make-lang.
39
40 rm -f Make-lang
41 touch Make-lang
42
43 for subdir in . $savesubdirs
44 do
45         if [ $subdir != . ]
46         then
47                 cat $savesrcdir/$subdir/Make-lang.in >> Make-lang
48         fi
49 done