]> gcc.gnu.org Git - gcc.git/blame - fixincludes/mkfixinc.sh
mkfixinc.sh: Check error code from 'cat'.
[gcc.git] / fixincludes / mkfixinc.sh
CommitLineData
71b5d516
PB
1#! /bin/sh
2
53c7ffe7 3if [ $# -ne 1 ]
71b5d516 4then
53c7ffe7 5 echo "Usage: $0 <target-mach-triplet>"
71b5d516
PB
6 exit 1
7fi
8
53c7ffe7 9machine=$1
71b5d516
PB
10target=fixinc.sh
11
12# Check for special fix rules for particular targets
13case $machine in
14 alpha*-dec-*vms* | \
15 arm-semi-aof | \
16 hppa1.1-*-osf* | \
17 hppa1.1-*-bsd* | \
18 i370-*-openedition | \
19 i?86-moss-msdos* | \
20 i?86-*-moss* | \
21 i?86-*-pe | \
22 i?86-*-cygwin* | \
23 i?86-*-mingw32* | \
24 i?86-*-uwin* | \
25 i?86-*-interix* | \
26 powerpc-*-eabiaix* | \
27 powerpc-*-eabisim* | \
28 powerpc-*-eabi* | \
29 powerpc-*-rtems* | \
30 powerpcle-*-eabisim* | \
31 powerpcle-*-eabi* )
32 # IF there is no include fixing,
33 # THEN create a no-op fixer and exit
34 (echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
35 ;;
36
37 *)
b2cfdb12 38 cat < ${srcdir}/fixinc.in > ${target} || exit 1
71b5d516
PB
39 ;;
40esac
41chmod 755 ${target}
This page took 0.163694 seconds and 5 git commands to generate.