Avoid unnecessary dependencies on COND_EXEC insns.
[official-gcc.git] / gcc / fixinc / mkfixinc.sh
blob5bb6a5502c9daca72663f566c0419782d8f5ff9e
1 #! /bin/sh
3 if [ $# -ne 2 ]
4 then
5 echo "Usage: $0 <build-mach-triplet> <target-mach-triplet>"
6 exit 1
7 fi
9 build=$1
10 machine=$2
11 target=../fixinc.sh
13 echo constructing ${target} for $machine to run on $build
14 fixincludes="${machine}"
16 # Choose one or two-process fix methodology. Systems that cannot handle
17 # bi-directional pipes must use the twoprocess method.
19 case $build in
20 i?86-*-msdosdjgpp* | \
21 *-*-beos* )
22 MAKE="${MAKE} TARGETS=twoprocess"
23 CFLAGS="${CFLAGS} -DSEPARATE_FIX_PROC"
26 * )
27 MAKE="${MAKE} TARGETS=oneprocess"
29 esac
31 # Check for special fix rules for particular targets
32 case $machine in
33 *-*-sysv4* | \
34 i?86-*-sysv5* | \
35 i?86-*-udk*)
36 fixincludes=fixinc.svr4
39 i?86-*-interix* | \
40 alpha-*-interix*)
41 fixincludes=fixinc.interix
44 i?86-*-openbsd*)
45 fixincludes=fixinc.wrap
48 alpha*-*-winnt* | \
49 i?86-*-winnt3*)
50 fixincludes=fixinc.winnt
53 i?86-sequent-ptx* | i?86-sequent-sysv[34]*)
54 fixincludes=fixinc.ptx
57 alpha*-dec-vms* | \
58 arm-semi-aout | armel-semi-aout | \
59 arm-semi-aof | armel-semi-aof | \
60 c*-convex-* | \
61 hppa1.1-*-osf* | \
62 hppa1.0-*-osf* | \
63 hppa1.1-*-bsd* | \
64 hppa1.0-*-bsd* | \
65 hppa*-*-lites* | \
66 i?86-moss-msdos* | i?86-*-moss* | \
67 i?86-*-osf1* | \
68 i?86-*-win32 | \
69 i?86-*-pe | i?86-*-cygwin* | \
70 i?86-*-mingw32* | \
71 i?86-*-uwin* | \
72 mips-sgi-irix5cross64 | \
73 powerpc-*-eabiaix* | \
74 powerpc-*-eabisim* | \
75 powerpc-*-eabi* | \
76 powerpc-*-rtems* | \
77 powerpcle-*-eabisim* | \
78 powerpcle-*-eabi* | \
79 powerpcle-*-winnt* | \
80 powerpcle-*-pe | powerpcle-*-cygwin* | \
81 thumb-*-coff* | thumbel-*-coff* )
82 fixincludes=
84 esac
86 # IF there is no include fixing,
87 # THEN create a no-op fixer and exit
89 if test -z "$fixincludes"
90 then
91 (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
92 chmod 755 ${target}
93 exit 0
96 # IF the fixer is supplied in our source directory,
97 # THEN copy that into place
99 if test -f ${srcdir}/"${fixincludes}"
100 then
101 echo copying ${srcdir}/$fixincludes to ${target}
102 cp ${srcdir}/$fixincludes ${target}
103 chmod 755 ${target}
104 exit 0
107 # OK. We gotta make the thing.
108 # make and install either the binary or the default script
110 defs="SHELL=\"$SHELL\" CC=\"$CC\" CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\""
111 cmd="$MAKE ${defs} install-bin"
112 echo $cmd
113 eval $cmd