OSDN Git Service

* fixinc/mkfixinc.sh: Don't disable fixincludes for any linux*.
[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         *-*-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         i?86-*-openbsd*)
36                 fixincludes=fixinc.wrap
37                 ;;
38
39         alpha*-*-winnt* | \
40         i?86-*-winnt3*)
41                 fixincludes=fixinc.winnt
42                 ;;
43
44         i?86-sequent-ptx* | i?86-sequent-sysv[34]*)
45                 fixincludes=fixinc.ptx
46                 ;;
47
48         alpha*-dec-vms* | \
49         arm-semi-aout | armel-semi-aout | \
50         arm-semi-aof | armel-semi-aof | \
51         arm-*-gnu* | \
52         c*-convex-* | \
53         hppa1.1-*-osf* | \
54         hppa1.0-*-osf* | \
55         hppa1.1-*-bsd* | \
56         hppa1.0-*-bsd* | \
57         hppa*-*-lites* | \
58         *-*-beos* | \
59         *-*-gnu* | \
60         i?86-moss-msdos* | i?86-*-moss* | \
61         i?86-*-osf1* | \
62         i?86-*-win32 | \
63         i?86-*-pe | i?86-*-cygwin* | \
64         i?86-*-mingw32* | \
65         i?86-*-uwin* | i?86-*-msdosdjgpp* | \
66         mips-sgi-irix5cross64 | \
67         powerpc-*-eabiaix* | \
68         powerpc-*-eabisim* | \
69         powerpc-*-eabi*    | \
70         powerpc-*-rtems*   | \
71         powerpcle-*-eabisim* | \
72         powerpcle-*-eabi*  | \
73         powerpcle-*-winnt* | \
74         powerpcle-*-pe | powerpcle-*-cygwin* | \
75         thumb-*-coff* | thumbel-*-coff* )
76                 fixincludes=
77                 ;;
78 esac
79
80 #  IF there is no include fixing,
81 #  THEN create a no-op fixer and exit
82 #
83 if test -z "$fixincludes"
84 then
85     (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
86     chmod 755 ${target}
87     exit 0
88 fi
89
90 #  IF the fixer is supplied in our source directory,
91 #  THEN copy that into place
92 #
93 if test -f ${srcdir}/"${fixincludes}"
94 then
95     echo copying ${srcdir}/$fixincludes to ${target}
96     cp ${srcdir}/$fixincludes ${target}
97     chmod 755 ${target}
98     exit 0
99 fi
100
101 #  OK.  We gotta make the thing.
102 #  make and install either the binary or the default script
103
104 cmd="$MAKE SHELL=\"$SHELL\" CC=\"$CC\" CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\" install-bin"
105 echo $cmd
106 eval $cmd