Improve support for arm-wince-pe target:
[official-gcc.git] / gcc / fixinc / mkfixinc.sh
blob042ed820af18f87c175149d255d82413aab23984
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 two process method.
19 case $build in
20 i?86-*-msdosdjgpp* | \
21 *-*-beos* )
22 MAKE="${MAKE} TARGETS=twoprocess"
23 CFLAGS="${CFLAGS} -DSEPARATE_FIX_PROC"
26 vax-dec-bsd* )
27 CFLAGS="${CFLAGS} -Dexit=xexit -Datexit=xatexit"
28 MAKE="${MAKE} TARGETS=oneprocess"
31 * )
32 MAKE="${MAKE} TARGETS=oneprocess"
34 esac
36 # Check for special fix rules for particular targets
37 case $machine in
38 i?86-*-sysv4.2uw2* )
41 *-*-sysv4* )
42 fixincludes=fixinc.svr4
45 i?86-*-interix* | \
46 alpha-*-interix*)
47 fixincludes=fixinc.interix
50 i?86-*-openbsd*)
51 fixincludes=fixinc.wrap
54 alpha*-*-winnt* | \
55 i?86-*-winnt3*)
56 fixincludes=fixinc.winnt
59 i?86-sequent-ptx* | i?86-sequent-sysv[34]*)
60 fixincludes=fixinc.ptx
63 alpha*-dec-*vms* | \
64 arm-semi-aout | \
65 armel-semi-aout | \
66 arm-semi-aof | \
67 armel-semi-aof | \
68 hppa1.1-*-osf* | \
69 hppa1.0-*-osf* | \
70 hppa1.1-*-bsd* | \
71 hppa1.0-*-bsd* | \
72 hppa*-*-lites* | \
73 i370-*-openedition | \
74 i?86-moss-msdos* | \
75 i?86-*-moss* | \
76 i?86-*-win32 | \
77 i?86-*-pe | \
78 i?86-*-cygwin* | \
79 i?86-*-mingw32* | \
80 i?86-*-uwin* | \
81 powerpc-*-eabiaix* | \
82 powerpc-*-eabisim* | \
83 powerpc-*-eabi* | \
84 powerpc-*-rtems* | \
85 powerpcle-*-eabisim* | \
86 powerpcle-*-eabi* | \
87 powerpcle-*-winnt* | \
88 powerpcle-*-pe | \
89 powerpcle-*-cygwin* | \
90 thumb-*-coff* | \
91 thumbel-*-coff* )
92 # Don't do any fixing.
94 fixincludes=
96 esac
98 # IF there is no include fixing,
99 # THEN create a no-op fixer and exit
101 if test -z "$fixincludes"
102 then
103 (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
104 chmod 755 ${target}
105 exit 0
108 # IF the fixer is supplied in our source directory,
109 # THEN copy that into place
111 if test -f ${srcdir}/"${fixincludes}"
112 then
113 echo copying ${srcdir}/$fixincludes to ${target}
114 cp ${srcdir}/$fixincludes ${target}
115 chmod 755 ${target}
116 exit 0
119 # OK. We gotta make the thing.
120 # make and install either the binary or the default script
122 defs="SHELL=\"$SHELL\" CC=\"$CC\" CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\" LIBERTY=\"$LIBERTY\""
123 cmd="$MAKE ${defs} install-bin"
124 echo $cmd
125 eval $cmd