txinfo-absolute-srcdir-pr408.sh 1.5 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. # Make sure Texinfo installation works when absolute --srcdir is used.
  17. # PR/408
  18. required='makeinfo'
  19. . test-init.sh
  20. echo AC_OUTPUT >> configure.ac
  21. cat > Makefile.am << 'END'
  22. info_TEXINFOS = main.texi
  23. END
  24. cat > main.texi << 'END'
  25. \input texinfo
  26. @setfilename main.info
  27. @settitle main
  28. @node Top
  29. Hello walls.
  30. @include version.texi
  31. @bye
  32. END
  33. $ACLOCAL
  34. $AUTOMAKE --add-missing
  35. $AUTOCONF
  36. ./configure
  37. $MAKE
  38. $MAKE distclean
  39. abscwd=$(pwd) || fatal_ "getting current working directory"
  40. mkdir build
  41. cd build
  42. ../configure --srcdir="$abscwd" \
  43. --prefix="$abscwd/build/_inst" \
  44. --infodir="$abscwd/build/_inst/info"
  45. $MAKE install
  46. test -f ../main.info
  47. test ! -e ./main.info
  48. test -f _inst/info/main.info
  49. $MAKE uninstall
  50. test ! -e _inst/info/main.info
  51. test -f ../main.info
  52. # Multiple uninstall should not fail.
  53. $MAKE uninstall
  54. :