conflnk2.sh 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. # Test to make sure that sources for links created by AC_CONFIG_LINKS
  17. # are distributed.
  18. . test-init.sh
  19. cat > Makefile.am << 'END'
  20. SUBDIRS = sdir
  21. .PHONY: test
  22. test: distdir
  23. test -f $(distdir)/src
  24. test -f $(distdir)/src2
  25. test -f $(distdir)/sdir/src3
  26. test -f $(distdir)/sdir-no-make/src4
  27. test 2 -gt `find $(distdir)/sdir -type d | wc -l`
  28. test 2 -gt `find $(distdir)/sdir-no-make -type d | wc -l`
  29. test 4 -gt `find $(distdir) -type d | wc -l`
  30. END
  31. : > src
  32. : > src2
  33. mkdir sdir
  34. : > sdir/Makefile.am
  35. : > sdir/src3
  36. mkdir sdir-no-make
  37. : > sdir-no-make/src4
  38. cat >>configure.ac << 'EOF'
  39. AC_CONFIG_FILES([sdir/Makefile])
  40. AC_CONFIG_LINKS([dest:src])
  41. AC_CONFIG_LINKS([sdir/dest2:src2 sdir-no-make/dest3:sdir/src3])
  42. AC_CONFIG_LINKS([sdir/dest4:sdir-no-make/src4])
  43. AC_OUTPUT
  44. EOF
  45. $ACLOCAL
  46. $AUTOMAKE
  47. $AUTOCONF
  48. ./configure
  49. $MAKE test
  50. :