OSDN Git Service

* fixinc/mkfixinc.sh: Use the ordinary fixincludes on Solaris.
[pf3gnuchains/gcc-fork.git] / gcc / fixinc / mkfixinc.sh
1 #! /bin/sh
2
3 machine=$1
4 if [ -z "$machine" ]
5 then
6         echo No machine name given
7         exit 1
8 fi
9
10 target=../fixinc.sh
11
12 echo constructing ${target} for $machine
13 fixincludes="${machine}"
14
15 case $machine in
16         i[34567]86-*-linux*)
17                 :
18                 ;;
19
20         *-*-sysv4*)
21                 fixincludes=fixinc.svr4
22                 ;;
23
24         i?86-*-sysv5* | \
25         i?86-*-udk*)
26                 fixincludes=fixinc.svr4
27                 ;;
28
29         i?86-*-interix* | \
30         alpha-*-interix*)
31                 fixincludes=fixinc.interix
32                 ;;
33
34         *-*-netbsd* | \
35         alpha*-*-linux*libc1* | \
36         i?86-*-openbsd*)
37                 fixincludes=fixinc.wrap
38                 ;;
39
40         alpha*-*-winnt* | \
41         i?86-*-winnt3*)
42                 fixincludes=fixinc.winnt
43                 ;;
44
45         i?86-sequent-ptx* | i?86-sequent-sysv[34]*)
46                 fixincludes=fixinc.ptx
47                 ;;
48
49         alpha*-dec-vms* | \
50         arm-semi-aout | armel-semi-aout | \
51         arm-semi-aof | armel-semi-aof | \
52         arm-*-gnu* | \
53         c*-convex-* | \
54         hppa1.1-*-osf* | \
55         hppa1.0-*-osf* | \
56         hppa1.1-*-bsd* | \
57         hppa1.0-*-bsd* | \
58         hppa*-*-lites* | \
59         *-*-linux* | \
60         *-*-gnu* | \
61         i?86-moss-msdos* | i?86-*-moss* | \
62         i?86-*-osf1* | \
63         i?86-*-win32 | \
64         i?86-*-pe | i?86-*-cygwin* | \
65         i?86-*-mingw32* | \
66         i?86-*-uwin* | i?86-*-msdosdjgpp* | \
67         mips-sgi-irix5cross64 | \
68         powerpc-*-eabiaix* | \
69         powerpc-*-eabisim* | \
70         powerpc-*-eabi*    | \
71         powerpc-*-rtems*   | \
72         powerpcle-*-eabisim* | \
73         powerpcle-*-eabi*  | \
74         powerpcle-*-winnt* | \
75         powerpcle-*-pe | powerpcle-*-cygwin* | \
76         thumb-*-coff* | thumbel-*-coff* )
77                 fixincludes=
78                 ;;
79 esac
80
81 #  IF there is no include fixing,
82 #  THEN create a no-op fixer and exit
83 #
84 if test -z "$fixincludes"
85 then
86     (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
87     chmod 755 ${target}
88     exit 0
89 fi
90
91 #  IF the fixer is supplied in our source directory,
92 #  THEN copy that into place
93 #
94 if test -f ${srcdir}/"${fixincludes}"
95 then
96     echo copying ${srcdir}/$fixincludes to ${target}
97     cp ${srcdir}/$fixincludes ${target}
98     chmod 755 ${target}
99     exit 0
100 fi
101
102 #  OK.  We gotta make the thing.
103 #  make and install either the binary or the default script
104
105 cmd="$MAKE SHELL=\"$SHELL\" CC=\"$CC\" CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\" install-bin"
106 echo $cmd
107 eval $cmd