* config/mips/elf.h (ASM_DECLARE_OBJECT_NAME): Use
[official-gcc.git] / gcc / fixinc / mkfixinc.sh
blobff178b9b0d2108650454927829ae75fc09b4c40d
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-sequent-ptx* | i?86-sequent-sysv[34]*)
46 fixincludes=fixinc.ptx
49 alpha*-dec-*vms* | \
50 arm-semi-aout | \
51 armel-semi-aout | \
52 arm-semi-aof | \
53 armel-semi-aof | \
54 hppa1.1-*-osf* | \
55 hppa1.0-*-osf* | \
56 hppa1.1-*-bsd* | \
57 hppa1.0-*-bsd* | \
58 hppa*-*-lites* | \
59 i370-*-openedition | \
60 i?86-moss-msdos* | \
61 i?86-*-moss* | \
62 i?86-*-win32 | \
63 i?86-*-pe | \
64 i?86-*-cygwin* | \
65 i?86-*-mingw32* | \
66 i?86-*-uwin* | \
67 i?86-*-interix* | \
68 powerpc-*-eabiaix* | \
69 powerpc-*-eabisim* | \
70 powerpc-*-eabi* | \
71 powerpc-*-rtems* | \
72 powerpcle-*-eabisim* | \
73 powerpcle-*-eabi* | \
74 powerpcle-*-winnt* | \
75 powerpcle-*-pe | \
76 powerpcle-*-cygwin* | \
77 thumb-*-coff* | \
78 thumbel-*-coff* )
79 # Don't do any fixing.
81 fixincludes=
83 esac
85 # IF there is no include fixing,
86 # THEN create a no-op fixer and exit
88 if test -z "$fixincludes"
89 then
90 (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
91 chmod 755 ${target}
92 exit 0
95 # IF the fixer is supplied in our source directory,
96 # THEN copy that into place
98 if test -f ${srcdir}/"${fixincludes}"
99 then
100 echo copying ${srcdir}/$fixincludes to ${target}
101 cp ${srcdir}/$fixincludes ${target}
102 chmod 755 ${target}
103 exit 0
106 # OK. We gotta make the thing.
107 # make and install either the binary or the default script
109 defs="SHELL=\"$SHELL\" CC=\"$CC\" CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\" LIBERTY=\"$LIBERTY\""
110 cmd="$MAKE ${defs} install-bin"
111 echo $cmd
112 eval $cmd