aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixinc
diff options
context:
space:
mode:
authorBruce Korb <autogen@linuxbox.com>1999-10-25 16:05:08 +0000
committerBruce Korb <korbb@gcc.gnu.org>1999-10-25 16:05:08 +0000
commitdc994a6d4839382766097f5df1d6f68f10639ef8 (patch)
treef8b87527b2492c47a74adf603d154b0159a80ab4 /gcc/fixinc
parent311dc497fc1b204102f64f875d8a893ac9d55b95 (diff)
downloadgcc-dc994a6d4839382766097f5df1d6f68f10639ef8.zip
gcc-dc994a6d4839382766097f5df1d6f68f10639ef8.tar.gz
gcc-dc994a6d4839382766097f5df1d6f68f10639ef8.tar.bz2
Provide a means for specifying -D options to AutoGen
From-SVN: r30165
Diffstat (limited to 'gcc/fixinc')
-rwxr-xr-xgcc/fixinc/genfixes64
1 files changed, 51 insertions, 13 deletions
diff --git a/gcc/fixinc/genfixes b/gcc/fixinc/genfixes
index 25964a0e..cfa8a4b 100755
--- a/gcc/fixinc/genfixes
+++ b/gcc/fixinc/genfixes
@@ -1,43 +1,81 @@
#! /bin/sh
+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
+
SHELL=/bin/sh
export SHELL
+AG=""
+if [ $# -eq 0 ] ; then
+ not_done=false
+else
+ not_done=true
+fi
+
+while $not_done
+do
+ case "$1" in
+ -D )
+ shift
+ if [ $# -eq 0 ] ; then
+ not_done=false
+ else
+ AG="$AG -D$1"
+ shift
+ fi
+ ;;
+
+ -D* )
+ AG="$AG $1"
+ shift
+ ;;
+
+ '-?' )
+ echo "USAGE: gendefs [ -D<def-name> ... ] [ <output-name> ]"
+ echo "WHERE: '<def-name>' specifies a #define test name from inclhack.def"
+ echo " and '<output-name>' is one of: inclhack.sh fixincl.x fixincl.sh"
+ echo "The default is to produce all three outputs."
+ exit 0
+ ;;
+
+ * )
+ not_done=false
+ ;;
+ esac
+done
if [ $# -eq 0 ] ; then
echo AutoGen-ing inclhack.sh
- autogen inclhack.def
+ $AG inclhack.def
echo AutoGen-ing fixincl.x
- autogen -T fixincl.tpl -b fixincl inclhack.def
+ $AG -T fixincl.tpl -b fixincl inclhack.def
echo AutoGen-ing fixincl.sh
- autogen -DPROGRAM=1 -b fixincl inclhack.def
+ $AG -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
+ $AG inclhack.sh
;;
fixincl.x )
echo AutoGen-ing fixincl.x
- autogen -T fixincl.tpl -b fixincl inclhack.def
+ $AG -T fixincl.tpl -b fixincl inclhack.def
;;
fixincl.sh )
echo AutoGen-ing fixincl.sh
- autogen -DPROGRAM=1 -b fixincl inclhack.def
+ $AG -DPROGRAM=1 -b fixincl inclhack.def
;;
* )