genfixes 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. if [ $# -eq 0 ] ; then
  49. set -- fixincl.x
  50. fi
  51. AG="autogen $AG"
  52. set -e
  53. if [ -z "`${AG} -v | fgrep ' 5.'`" ]
  54. then
  55. echo "AutoGen appears to be out of date or not correctly installed."
  56. echo "Please download and install:"
  57. echo " ftp://gcc.gnu.org/pub/gcc/infrastructure/autogen.tar.gz"
  58. touch fixincl.x
  59. else
  60. echo AutoGen-ing fixincl.x
  61. $AG inclhack.def
  62. fi
  63. exit 0