aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixinc/genfixes
blob: 25964a0ea030fa33e6879b1125d49a1a63ec60c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#! /bin/sh

SHELL=/bin/sh
export SHELL

if [ $# -eq 0 ] ; then
  echo AutoGen-ing inclhack.sh
  autogen inclhack.def

  echo AutoGen-ing fixincl.x
  autogen -T fixincl.tpl -b fixincl inclhack.def

  echo AutoGen-ing fixincl.sh
  autogen -DPROGRAM=1 -b fixincl inclhack.def
  exit 0
fi

if (autogen --help > /dev/null 2>&1) ; then : ; else
  echo "AutoGen does not appear to be correctly installed."
  echo "Please download and install:"
  echo "   ftp://sourceware.cygnus.com/pub/egcs/infrastructure/autogen.tar.gz"
  exit 1
fi

set -e

case "$1" in
inclhack.def )
  echo AutoGen-ing inclhack.sh
  autogen inclhack.sh
  ;;

fixincl.x )
  echo AutoGen-ing fixincl.x
  autogen -T fixincl.tpl -b fixincl inclhack.def
  ;;

fixincl.sh )
  echo AutoGen-ing fixincl.sh
  autogen -DPROGRAM=1 -b fixincl inclhack.def
  ;;

* )
  echo genfixes cannot create $1
  exit 1
  ;;
esac

exit 0