2
0

uninstall-pr9578.sh 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. # Check against automake bug#9578: "make uninstall" issued before
  17. # "make install" or after a mere "make install-data" or a mere
  18. # "make install-exec" failed spuriously.
  19. #
  20. # FIXME: this test only deal with DATA and script primaries; maybe we
  21. # need sister tests for other primaries too? E.g., PROGRAMS, LISP,
  22. # PYTHON, etc...
  23. . test-init.sh
  24. cat >> configure.ac << 'END'
  25. AC_OUTPUT
  26. END
  27. : > foo
  28. : > bar
  29. cat > Makefile.am << 'END'
  30. bin_SCRIPTS = foo
  31. data_DATA = bar
  32. END
  33. $ACLOCAL
  34. $AUTOMAKE
  35. $AUTOCONF
  36. ./configure --prefix="$(pwd)/inst"
  37. $MAKE uninstall
  38. test ! -e inst
  39. rm -rf inst
  40. $MAKE install-exec
  41. test -f inst/bin/foo || exit 99 # Sanity check.
  42. $MAKE uninstall
  43. test ! -e inst/bin/foo
  44. $MAKE install-data
  45. test -f inst/share/bar || exit 99 # Sanity check.
  46. $MAKE uninstall
  47. test ! -e inst/share/bar
  48. rm -rf inst
  49. $MAKE install-exec
  50. test -f inst/bin/foo || exit 99 # Sanity check.
  51. $MAKE uninstall
  52. test ! -e inst/bin/foo
  53. :