lisp2.sh 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #! /bin/sh
  2. # Copyright (C) 2002-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 that Automake suggest using AM_PATH_LISPDIR to define lispdir.
  17. . test-init.sh
  18. : TRY 1 -- We lack both EMACS and lispdir.
  19. cat > Makefile.am << 'END'
  20. lisp_LISP = foo.el
  21. END
  22. $ACLOCAL
  23. AUTOMAKE_fails
  24. grep AM_PATH_LISPDIR stderr
  25. grep '[Ll]isp source.*EMACS.* undefined' stderr
  26. grep '[Ll]isp source.*lispdir.* undefined' stderr
  27. grep ' add .*AM_PATH_LISPDIR' stderr
  28. : TRY 2 -- Setting lispdir should not be enough.
  29. cat > Makefile.am << 'END'
  30. lispdir = /usr/share/emacs/site-lisp
  31. lisp_LISP = foo.el
  32. END
  33. $ACLOCAL
  34. AUTOMAKE_fails
  35. grep 'lispdir.*undefined' stderr && exit 1
  36. grep '[Ll]isp source.*EMACS.* undefined' stderr
  37. grep 'define .*EMACS.* add .*AM_PATH_LISPDIR' stderr
  38. : TRY 3 -- Setting EMACS should not be enough.
  39. cat > Makefile.am << 'END'
  40. EMACS = emacs
  41. lisp_LISP = foo.el
  42. END
  43. $ACLOCAL
  44. AUTOMAKE_fails
  45. grep 'EMACS.*undefined' stderr && exit 1
  46. grep '[Ll]isp source.*lispdir.* undefined' stderr
  47. grep 'define .*lispdir.* add .*AM_PATH_LISPDIR' stderr
  48. : TRY 4 -- Setting both EMACS and lispdir is OK.
  49. cat > Makefile.am << 'END'
  50. lispdir = /usr/share/emacs/site-lisp
  51. EMACS = emacs
  52. lisp_LISP = foo.el
  53. END
  54. $ACLOCAL
  55. $AUTOMAKE -a
  56. :