output11.sh 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #! /bin/sh
  2. # Copyright (C) 2005-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 an AC_CONFIG_FILES ignore filenames with shell variables.
  17. . test-init.sh
  18. cat >> configure.ac << \END
  19. AC_SUBST([FOO], [foo])
  20. file1=this.in
  21. echo @FOO@ >$file1
  22. file2=that
  23. file3=mumble
  24. file4=foo
  25. AC_CONFIG_FILES([this:$file1],, [file1=$file1])
  26. AC_CONFIG_FILES([sub/this:$file1])
  27. AC_CONFIG_FILES([${file2}:this],, [file2=$file2])
  28. AC_CONFIG_FILES([$file3],, [file3=$file3])
  29. AC_CONFIG_FILES([$file4:foo.in],, [file4=$file4])
  30. AC_CONFIG_FILES([sub/Makefile])
  31. AC_OUTPUT
  32. END
  33. mkdir sub
  34. cat >Makefile.am <<\EOF
  35. SUBDIRS = sub
  36. EXTRA_DIST = mumble.in
  37. DISTCLEANFILES = this.in that mumble foo
  38. dist-hook:
  39. test -f $(distdir)/foo.in
  40. test ! -f $(distdir)/this
  41. EOF
  42. echo @FOO@ >mumble.in
  43. echo @FOO@ >foo.in
  44. : >sub/Makefile.am
  45. $ACLOCAL
  46. $AUTOCONF
  47. $AUTOMAKE
  48. $FGREP ' $file' Makefile.in sub/Makefile.in && exit 1
  49. ./configure
  50. $MAKE distcheck
  51. cd sub
  52. rm -f this
  53. $MAKE this
  54. grep foo this