OSDN Git Service

Upgrade to AutoGen 5 Template
[pf3gnuchains/gcc-fork.git] / gcc / fixinc / genfixes
index e9fa5ac..d556de6 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
 # This file is part of GNU CC.
 
 # GNU CC is free software; you can redistribute it and/or modify
@@ -48,7 +48,7 @@ do
     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:"
-    echo "       inclhack.sh fixincl.x fixincl.sh machine.h"
+    echo "       fixincl.x machine.h"
     echo "The default is to produce the first three outputs."
     exit 0
     ;;
@@ -60,55 +60,34 @@ do
 done
 
 if [ $# -eq 0 ] ; then
-  ${SHELL} $0 $AG inclhack.sh || exit 1
-  ${SHELL} $0 $AG fixincl.x   || exit 1
-  ${SHELL} $0 $AG fixincl.sh  || exit 1
-  exit 0
+  set -- fixincl.x
 fi
 
 AG="autogen $AG"
 set -e
 
-case "$1" in
-inclhack.sh | */inclhack.sh )
-  if (autogen --help > /dev/null 2>&1)
-  then
-    echo AutoGen-ing inclhack.sh
-    $AG inclhack.def
-  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"
-    touch inclhack.sh
-  fi
-  ;;
+if [ -z "`${AG} -v | fgrep 'Ver. 5.'`" ]
+then
+  echo "Your AutoGen is either out of date or not available" >&2
+  echo "Please get AutoGen5 from ftp.gnu.org/gnu/autogen" >&2
+  touch $@
+  exit 0
+fi
 
+case "$1" in
 fixincl.x | */fixincl.x )
-  if (autogen --help > /dev/null 2>&1)
+  if (${AG} --help > /dev/null 2>&1)
   then
     echo AutoGen-ing fixincl.x
-    $AG -T fixincl.tpl -b fixincl inclhack.def
+    $AG inclhack.def
   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"
+    echo "   ftp://gcc.gnu.org/pub/gcc/infrastructure/autogen.tar.gz"
     touch fixincl.x
   fi
   ;;
 
-fixincl.sh | */fixincl.sh )
-  if (autogen --help > /dev/null 2>&1)
-  then
-    echo AutoGen-ing fixincl.sh
-    $AG -DPROGRAM=1 -b fixincl inclhack.def
-  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"
-    touch fixincl.sh
-  fi
-  ;;
-
 machname.h | */machname.h )
   # This script extracts from the specs file all the predefined macros
   # that are not in the C89 reserved namespace (the reserved namespace