genfixes 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #! /bin/sh
  2. # Copyright (C) 1999, 2000, 2001, 2009, 2012 Free Software Foundation, Inc.
  3. # This file is part of GCC.
  4. # GCC is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 3, or (at your option)
  7. # any later version.
  8. # GCC is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with GCC; see the file COPYING3. If not see
  14. # <http://www.gnu.org/licenses/>.
  15. SHELL=/bin/sh
  16. export SHELL
  17. if [ $# -eq 0 ] ; then
  18. not_done=false
  19. else
  20. not_done=true
  21. fi
  22. while $not_done
  23. do
  24. case "$1" in
  25. -D )
  26. shift
  27. if [ $# -eq 0 ] ; then
  28. not_done=false
  29. else
  30. AG="$AG -D$1"
  31. shift
  32. fi
  33. ;;
  34. -D* )
  35. AG="$AG $1"
  36. shift
  37. ;;
  38. '-?' )
  39. echo "USAGE: gendefs [ -D<def-name> ... ]"
  40. echo "WHERE: '<def-name>' specifies a #define test name from inclhack.def"
  41. exit 0
  42. ;;
  43. * )
  44. not_done=false
  45. ;;
  46. esac
  47. done
  48. AG="autogen $AG"
  49. set -e
  50. if [ -z "`${AG} -v | fgrep ' 5.'`" ]
  51. then
  52. echo "AutoGen appears to be out of date or not correctly installed."
  53. echo "Please download and install from:"
  54. echo " https://ftp.gnu.org/gnu/autogen/"
  55. touch fixincl.x
  56. exit 1
  57. else
  58. echo AutoGen-ing fixincl.x
  59. $AG inclhack.def
  60. fi
  61. exit 0