conflnk.sh 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 links created by AC_CONFIG_LINKS get removed with
  17. # 'make distclean'
  18. . test-init.sh
  19. echo 'SUBDIRS = sdir' > Makefile.am
  20. : > src
  21. mkdir sdir
  22. : > sdir/Makefile.am
  23. : > sdir/src2
  24. mkdir sdir-no-make
  25. cat >>configure.ac << 'EOF'
  26. AC_CONFIG_FILES([sdir/Makefile])
  27. AC_CONFIG_LINKS([dest:src])
  28. AC_CONFIG_LINKS([dest2:src])
  29. AC_CONFIG_LINKS([sdir/dest3:src])
  30. AC_CONFIG_LINKS([dest4:sdir/src2])
  31. AC_CONFIG_LINKS([sdir/dest5:sdir/src2 sdir-no-make/dest6:src])
  32. AC_OUTPUT
  33. EOF
  34. $ACLOCAL
  35. $AUTOMAKE
  36. $AUTOCONF
  37. ./configure
  38. # Make sure nothing is deleted by 'make clean'
  39. $MAKE clean
  40. test -r dest
  41. test -r dest2
  42. test -r sdir/dest3
  43. test -r dest4
  44. test -r sdir/dest5
  45. test -r sdir-no-make/dest6
  46. test -f src
  47. test -f sdir/src2
  48. # Make sure the links are deleted by 'make distclean' and the original files
  49. # are not.
  50. $MAKE distclean
  51. test -f src
  52. test -f sdir/src2
  53. test -r dest && exit 1
  54. test -r dest2 && exit 1
  55. test -r sdir/dest3 && exit 1
  56. test -r dest4 && exit 1
  57. test -r sdir/dest5 && exit 1
  58. test -r sdir-no-make/dest6 && exit 1
  59. :