8 echo No target system name given
12 # If we don't get two arguments, then assume both arguments
22 echo constructing ${target} for $machine to run on $build
23 fixincludes="${machine}"
25 # Choose fix build method by build system
28 MAKE="${MAKE} -f ${srcdir}/Makefile.DOS srcdir=${srcdir}"
32 MAKE="${MAKE} -f ${srcdir}/Makefile.BEOS srcdir=${srcdir}"
36 MAKE="${MAKE} -f Makefile"
40 # Check for special fix rules for particular targets
45 fixincludes=fixinc.svr4
50 fixincludes=fixinc.interix
54 fixincludes=fixinc.wrap
59 fixincludes=fixinc.winnt
62 i?86-sequent-ptx* | i?86-sequent-sysv[34]*)
63 fixincludes=fixinc.ptx
67 arm-semi-aout | armel-semi-aout | \
68 arm-semi-aof | armel-semi-aof | \
75 i?86-moss-msdos* | i?86-*-moss* | \
78 i?86-*-pe | i?86-*-cygwin* | \
81 mips-sgi-irix5cross64 | \
82 powerpc-*-eabiaix* | \
83 powerpc-*-eabisim* | \
86 powerpcle-*-eabisim* | \
88 powerpcle-*-winnt* | \
89 powerpcle-*-pe | powerpcle-*-cygwin* | \
90 thumb-*-coff* | thumbel-*-coff* )
95 # IF there is no include fixing,
96 # THEN create a no-op fixer and exit
98 if test -z "$fixincludes"
100 (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
105 # IF the fixer is supplied in our source directory,
106 # THEN copy that into place
108 if test -f ${srcdir}/"${fixincludes}"
110 echo copying ${srcdir}/$fixincludes to ${target}
111 cp ${srcdir}/$fixincludes ${target}
116 # OK. We gotta make the thing.
117 # make and install either the binary or the default script
119 defs="SHELL=\"$SHELL\" CC=\"$CC\" CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\""
120 cmd="$MAKE ${defs} install-bin"