lisp3.sh 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 that compiling interdependent elisp files works.
  17. required=emacs
  18. . test-init.sh
  19. cat > Makefile.am << 'EOF'
  20. lisp_LISP = am-one.el am-two.el am-three.el
  21. EXTRA_DIST = am-one.el am-two.el
  22. am-three.el:
  23. echo "(provide 'am-three)" > $@
  24. CLEANFILES = am-three.el
  25. EOF
  26. cat >> configure.ac << 'EOF'
  27. AM_PATH_LISPDIR
  28. AC_OUTPUT
  29. EOF
  30. echo "(require 'am-two)" > am-one.el
  31. echo "(require 'am-three) (provide 'am-two)" > am-two.el
  32. # am-three.el is a built source
  33. $ACLOCAL
  34. $AUTOCONF
  35. $AUTOMAKE --add-missing
  36. ./configure --prefix="$(pwd)/_inst"
  37. $MAKE
  38. test -f am-one.elc
  39. test -f am-two.elc
  40. test -f am-three.elc
  41. # Make sure we can recover from a deletion.
  42. rm -f am-one.elc
  43. $MAKE
  44. test -f am-one.elc
  45. # Test installation/deinstallation.
  46. $MAKE install
  47. find _inst # For debugging.
  48. # Keep thin in sync with m4/lispdir.m4.
  49. for dir in lib/emacs lib/xemacs share/emacs share/xemacs :; do
  50. if test $dir = :; then
  51. exit 1
  52. elif test -d _inst/$dir/site-lisp; then
  53. break
  54. fi
  55. done
  56. test -f _inst/$dir/site-lisp/am-one.el
  57. test -f _inst/$dir/site-lisp/am-one.elc
  58. test -f _inst/$dir/site-lisp/am-two.el
  59. test -f _inst/$dir/site-lisp/am-two.elc
  60. test -f _inst/$dir/site-lisp/am-three.el
  61. test -f _inst/$dir/site-lisp/am-three.elc
  62. $MAKE uninstall
  63. find _inst | $EGREP '\.elc?$' && exit 1
  64. # It should also work for VPATH-builds.
  65. $MAKE distcheck
  66. :