primary-prefix-valid-couples.sh 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #! /bin/sh
  2. # Copyright (C) 2011-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. # Test for valid prefix/primary combinations.
  17. # See also test 'primary-prefix-invalid-couples.sh'.
  18. . test-init.sh
  19. cat >> configure.ac <<'END'
  20. AC_PROG_CC
  21. AM_PROG_AR
  22. AC_PROG_RANLIB
  23. AC_PROG_LIBTOOL
  24. AM_PATH_PYTHON
  25. AM_PATH_LISPDIR
  26. END
  27. # Fake libtool availability.
  28. : > ltmain.sh
  29. : > config.sub
  30. : > config.guess
  31. cat > acinclude.m4 <<'END'
  32. AC_DEFUN([AC_PROG_LIBTOOL],
  33. [AC_SUBST([LIBTOOL], [:])])
  34. END
  35. # Other required files.
  36. echo '@setfilename foo.info' > foo.texi
  37. : > texinfo.tex
  38. : > py-compile
  39. : > ar-lib
  40. # Setup Makefile.am.
  41. : > Makefile.am
  42. for p in bin sbin libexec pkglibexec; do
  43. echo "${p}_PROGRAMS = prog-$p" >> Makefile.am
  44. done
  45. for p in lib pkglib; do
  46. echo "${p}_LIBRARIES = libs-$p.a" >> Makefile.am
  47. echo "${p}_LTLIBRARIES = libd-$p.la" >> Makefile.am
  48. done
  49. for p in bin sbin libexec pkglibexec pkgdata; do
  50. echo "${p}_SCRIPTS = $p.sh" >> Makefile.am
  51. done
  52. for p in data dataroot pkgdata doc html dvi pdf ps sysconf \
  53. sharedstate localstate lisp; do
  54. echo "${p}_DATA = $p.dat" >> Makefile.am
  55. done
  56. for p in include oldinclude pkginclude; do
  57. echo "${p}_HEADERS = $p.h" >> Makefile.am
  58. done
  59. for p in man man1 man2 man3 man4 man5 man6 man7 man8 man9; do
  60. echo "${p}_MANS = bar.$p"
  61. done
  62. echo "info_TEXINFOS = foo.texi" >> Makefile.am
  63. echo "lisp_LISP = foo.el" >> Makefile.am
  64. echo "python_PYTHON = foo.py" >> Makefile.am
  65. awk '{print NR ":" $0}' Makefile.am # For debugging.
  66. # Go with the tests.
  67. $ACLOCAL
  68. $AUTOMAKE
  69. :