* c-decl.c (duplicate_decls): Copy DECL_SAVED_TREE.
[official-gcc.git] / gcc / fixinc / mkfixinc.sh
blob29567bd35fc61657c4c73b58ad2dc5c1d772c199
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 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 *-*-sysv4* )
39 fixincludes=fixinc.svr4
42 i?86-*-interix* | \
43 alpha-*-interix*)
44 fixincludes=fixinc.interix
47 i?86-*-openbsd*)
48 fixincludes=fixinc.wrap
51 alpha*-*-winnt* | \
52 i?86-*-winnt3*)
53 fixincludes=fixinc.winnt
56 i?86-sequent-ptx* | i?86-sequent-sysv[34]*)
57 fixincludes=fixinc.ptx
60 alpha*-dec-vms* | \
61 arm-semi-aout | armel-semi-aout | \
62 arm-semi-aof | armel-semi-aof | \
63 c*-convex-* | \
64 hppa1.1-*-osf* | \
65 hppa1.0-*-osf* | \
66 hppa1.1-*-bsd* | \
67 hppa1.0-*-bsd* | \
68 hppa*-*-lites* | \
69 i?86-moss-msdos* | i?86-*-moss* | \
70 i?86-*-osf1* | \
71 i?86-*-win32 | \
72 i?86-*-pe | i?86-*-cygwin* | \
73 i?86-*-mingw32* | \
74 i?86-*-uwin* | \
75 mips-sgi-irix5cross64 | \
76 powerpc-*-eabiaix* | \
77 powerpc-*-eabisim* | \
78 powerpc-*-eabi* | \
79 powerpc-*-rtems* | \
80 powerpcle-*-eabisim* | \
81 powerpcle-*-eabi* | \
82 powerpcle-*-winnt* | \
83 powerpcle-*-pe | powerpcle-*-cygwin* | \
84 thumb-*-coff* | thumbel-*-coff* )
85 fixincludes=
87 esac
89 # IF there is no include fixing,
90 # THEN create a no-op fixer and exit
92 if test -z "$fixincludes"
93 then
94 (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
95 chmod 755 ${target}
96 exit 0
99 # IF the fixer is supplied in our source directory,
100 # THEN copy that into place
102 if test -f ${srcdir}/"${fixincludes}"
103 then
104 echo copying ${srcdir}/$fixincludes to ${target}
105 cp ${srcdir}/$fixincludes ${target}
106 chmod 755 ${target}
107 exit 0
110 # OK. We gotta make the thing.
111 # make and install either the binary or the default script
113 defs="SHELL=\"$SHELL\" CC=\"$CC\" CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\""
114 cmd="$MAKE ${defs} install-bin"
115 echo $cmd
116 eval $cmd