OSDN Git Service

* fixinc/mkfixinc.sh: Remove winnt support.
[pf3gnuchains/gcc-fork.git] / gcc / fixinc / mkfixinc.sh
1 #! /bin/sh
2
3 if [ $# -ne 2 ]
4 then
5   echo "Usage: $0 <build-mach-triplet> <target-mach-triplet>"
6   exit 1
7 fi
8
9 build=$1
10 machine=$2
11 target=../fixinc.sh
12
13 echo constructing ${target} for $machine to run on $build
14 fixincludes="${machine}"
15
16 # Choose one or two-process fix methodology.  Systems that cannot handle
17 # bi-directional pipes must use the two process method.
18 #
19 case $build in
20         i?86-*-msdosdjgpp* | \
21         *-*-beos* )
22                 MAKE="${MAKE} TARGETS=twoprocess"
23                 CFLAGS="${CFLAGS} -DSEPARATE_FIX_PROC"
24                 ;;
25
26         vax-dec-bsd* )
27                 CFLAGS="${CFLAGS} -Dexit=xexit -Datexit=xatexit"
28                 MAKE="${MAKE} TARGETS=oneprocess"
29                 ;;
30
31         * )
32                 MAKE="${MAKE} TARGETS=oneprocess"
33                 ;;
34 esac
35
36 # Check for special fix rules for particular targets
37 case $machine in
38     i?86-*-sysv4.2uw2* )
39         ;;
40
41     *-*-sysv4* )
42         fixincludes=fixinc.svr4
43         ;;
44
45     i?86-*-interix* | \
46     alpha-*-interix*)
47         fixincludes=fixinc.interix
48         ;;
49
50     i?86-*-openbsd*)
51         fixincludes=fixinc.wrap
52         ;;
53
54     i?86-sequent-ptx* | i?86-sequent-sysv[34]*)
55         fixincludes=fixinc.ptx
56         ;;
57
58     alpha*-dec-*vms* | \
59     arm-semi-aout | \
60     armel-semi-aout | \
61     arm-semi-aof | \
62     armel-semi-aof | \
63     hppa1.1-*-osf* | \
64     hppa1.0-*-osf* | \
65     hppa1.1-*-bsd* | \
66     hppa1.0-*-bsd* | \
67     hppa*-*-lites* | \
68     i370-*-openedition | \
69     i?86-moss-msdos* | \
70     i?86-*-moss* | \
71     i?86-*-win32 | \
72     i?86-*-pe | \
73     i?86-*-cygwin* | \
74     i?86-*-mingw32* | \
75     i?86-*-uwin* | \
76     powerpc-*-eabiaix* | \
77     powerpc-*-eabisim* | \
78     powerpc-*-eabi*    | \
79     powerpc-*-rtems*   | \
80     powerpcle-*-eabisim* | \
81     powerpcle-*-eabi*  | \
82     powerpcle-*-winnt* | \
83     powerpcle-*-pe | \
84     powerpcle-*-cygwin* | \
85     thumb-*-coff* | \
86     thumbel-*-coff* )
87         #  Don't do any fixing.
88         #
89         fixincludes=
90         ;;
91 esac
92
93 #  IF there is no include fixing,
94 #  THEN create a no-op fixer and exit
95 #
96 if test -z "$fixincludes"
97 then
98     (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
99     chmod 755 ${target}
100     exit 0
101 fi
102
103 #  IF the fixer is supplied in our source directory,
104 #  THEN copy that into place
105 #
106 if test -f ${srcdir}/"${fixincludes}"
107 then
108     echo copying ${srcdir}/$fixincludes to ${target}
109     cp ${srcdir}/$fixincludes ${target}
110     chmod 755 ${target}
111     exit 0
112 fi
113
114 #  OK.  We gotta make the thing.
115 #  make and install either the binary or the default script
116
117 defs="SHELL=\"$SHELL\" CC=\"$CC\" CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\" LIBERTY=\"$LIBERTY\""
118 cmd="$MAKE ${defs} install-bin"
119 echo $cmd
120 eval $cmd