output7.sh 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #! /bin/sh
  2. # Copyright (C) 2003-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. # Check for support for colon separated input files in AC_CONFIG_FILES,
  17. # with sources in sub directories.
  18. . test-init.sh
  19. cat > configure.ac << END
  20. AC_INIT([$me], [1.0])
  21. AM_INIT_AUTOMAKE
  22. AC_CONFIG_FILES([
  23. Makefile:mk/toplevel.in
  24. sub/Makefile:mk/sub.in
  25. mk/Makefile
  26. ])
  27. AC_OUTPUT
  28. END
  29. mkdir mk sub
  30. cat >mk/Makefile.am <<'EOF'
  31. all-local:
  32. @echo in--mk
  33. EOF
  34. cat >mk/sub.am <<'EOF'
  35. EXTRA_DIST = foo
  36. all-local:
  37. @echo in--sub
  38. EOF
  39. cat >mk/toplevel.am <<'EOF'
  40. all-local:
  41. @echo at--toplevel
  42. SUBDIRS = mk sub
  43. EOF
  44. # We have to distribute something in foo, because some versions
  45. # of tar do not archive empty directories when passed the 'o'
  46. # flags. (This was fixed in GNU tar 1.12, but older
  47. # versions are still used: NetBSD 1.6.1 ships with tar 1.11.2).
  48. #
  49. # If sub/ is missing from the archive, config.status will fail
  50. # to compute $ac_abs_srcdir during a VPATH build: config.status
  51. # is able to create sub/ in the build tree, but it assumes the
  52. # directory already exists in the source tree.
  53. echo bar > sub/foo
  54. $ACLOCAL
  55. $AUTOCONF
  56. $AUTOMAKE
  57. ./configure
  58. run_make -O
  59. grep in--mk stdout
  60. grep in--sub stdout
  61. grep at--toplevel stdout
  62. $MAKE distcheck