help3.sh 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #! /bin/sh
  2. # Copyright (C) 2010-2017 Free Software Foundation, Inc.
  3. #
  4. # This program 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 2, or (at your option)
  7. # any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. # Make sure --help and --version takes precedence over other options.
  17. . test-init.sh
  18. # We must have full control over the content of the current directory.
  19. mkdir cleandir
  20. cd cleandir
  21. # Honour user overrides for $ACLOCAL and $AUTOMAKE, but without
  22. # adding extra options.
  23. ACLOCAL=$am_original_ACLOCAL
  24. AUTOMAKE=$am_original_AUTOMAKE
  25. cat > configure.ac <<END
  26. AC_INIT([$me], [1.0])
  27. AC_CONFIG_AUX_DIR([.]) dnl prevent automake from looking into '..'
  28. AM_INIT_AUTOMAKE([foreign])
  29. AC_CONFIG_FILES([Makefile])
  30. END
  31. cat > Makefile.am <<END
  32. # So that install-sh will be required.
  33. pkgdata_DATA =
  34. END
  35. $ACLOCAL --force --help --output=foo.m4
  36. test ! -e foo.m4
  37. $ACLOCAL --output=foo.m4 --version --force
  38. test ! -e foo.m4
  39. # Sanity check.
  40. $ACLOCAL --output=foo.m4 --force
  41. test -f foo.m4
  42. mv -f foo.m4 aclocal.m4 # autoconf will need aclocal.m4
  43. $AUTOMAKE --add-missing --help --copy
  44. test ! -e install-sh
  45. $AUTOMAKE --copy --version --add-mising
  46. test ! -e install-sh
  47. # Sanity check.
  48. $AUTOMAKE --add-missing --copy
  49. test -f install-sh
  50. :