11debfc3dSmrg#! /bin/sh 21debfc3dSmrg 31debfc3dSmrg# Copyright (C) 1999, 2000, 2001, 2009, 2012 Free Software Foundation, Inc. 41debfc3dSmrg# This file is part of GCC. 51debfc3dSmrg 61debfc3dSmrg# GCC is free software; you can redistribute it and/or modify 71debfc3dSmrg# it under the terms of the GNU General Public License as published by 81debfc3dSmrg# the Free Software Foundation; either version 3, or (at your option) 91debfc3dSmrg# any later version. 101debfc3dSmrg 111debfc3dSmrg# GCC is distributed in the hope that it will be useful, 121debfc3dSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 131debfc3dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 141debfc3dSmrg# GNU General Public License for more details. 151debfc3dSmrg 161debfc3dSmrg# You should have received a copy of the GNU General Public License 171debfc3dSmrg# along with GCC; see the file COPYING3. If not see 181debfc3dSmrg# <http://www.gnu.org/licenses/>. 191debfc3dSmrg 201debfc3dSmrgSHELL=/bin/sh 211debfc3dSmrgexport SHELL 221debfc3dSmrgif [ $# -eq 0 ] ; then 231debfc3dSmrg not_done=false 241debfc3dSmrgelse 251debfc3dSmrg not_done=true 261debfc3dSmrgfi 271debfc3dSmrg 281debfc3dSmrgwhile $not_done 291debfc3dSmrgdo 301debfc3dSmrg case "$1" in 311debfc3dSmrg -D ) 321debfc3dSmrg shift 331debfc3dSmrg if [ $# -eq 0 ] ; then 341debfc3dSmrg not_done=false 351debfc3dSmrg else 361debfc3dSmrg AG="$AG -D$1" 371debfc3dSmrg shift 381debfc3dSmrg fi 391debfc3dSmrg ;; 401debfc3dSmrg 411debfc3dSmrg -D* ) 421debfc3dSmrg AG="$AG $1" 431debfc3dSmrg shift 441debfc3dSmrg ;; 451debfc3dSmrg 461debfc3dSmrg '-?' ) 471debfc3dSmrg echo "USAGE: gendefs [ -D<def-name> ... ]" 481debfc3dSmrg echo "WHERE: '<def-name>' specifies a #define test name from inclhack.def" 491debfc3dSmrg exit 0 501debfc3dSmrg ;; 511debfc3dSmrg 521debfc3dSmrg * ) 531debfc3dSmrg not_done=false 541debfc3dSmrg ;; 551debfc3dSmrg esac 561debfc3dSmrgdone 571debfc3dSmrg 581debfc3dSmrgAG="autogen $AG" 591debfc3dSmrgset -e 601debfc3dSmrg 611debfc3dSmrgif [ -z "`${AG} -v | fgrep ' 5.'`" ] 621debfc3dSmrgthen 631debfc3dSmrg echo "AutoGen appears to be out of date or not correctly installed." 64*c0a68be4Smrg echo "Please download and install from:" 65*c0a68be4Smrg echo " https://ftp.gnu.org/gnu/autogen/" 661debfc3dSmrg touch fixincl.x 67*c0a68be4Smrg exit 1 681debfc3dSmrgelse 691debfc3dSmrg echo AutoGen-ing fixincl.x 701debfc3dSmrg $AG inclhack.def 711debfc3dSmrgfi 721debfc3dSmrg 731debfc3dSmrgexit 0 74