lisp-subdir2.sh 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #! /bin/sh
  2. # Copyright (C) 2012-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. # Compiling elisp files in different subdirectories.
  17. required=emacs
  18. . test-init.sh
  19. cat >> configure.ac << 'END'
  20. AM_PATH_LISPDIR
  21. AC_OUTPUT
  22. END
  23. cat > Makefile.am << 'END'
  24. dist_lisp_LISP = am-one.el
  25. nodist_lisp_LISP = sub/am-two.el
  26. sub/am-two.el:
  27. mkdir sub
  28. echo "(provide 'am-two)" > $@
  29. DISTCLEANFILES = $(nodist_lisp_LISP)
  30. dist_noinst_LISP = x/y/z/am-three.el
  31. elc-test:
  32. test -f am-one.elc
  33. test -f sub/am-two.elc
  34. test -f x/y/z/am-three.elc
  35. .PHONY: elc-test
  36. check-local: elc-test
  37. END
  38. mkdir x x/y x/y/z
  39. echo "(provide 'am-one)" > am-one.el
  40. # sub/am-two.el is generated at make runtime
  41. echo "(provide 'am-three)" > x/y/z/am-three.el
  42. $ACLOCAL
  43. $AUTOCONF
  44. $AUTOMAKE --add-missing
  45. ./configure
  46. $MAKE
  47. $MAKE elc-test
  48. $MAKE clean
  49. test ! -e am-one.elc
  50. test ! -e sub/am-two.elc
  51. test ! -e x/y/z/am-three.elc
  52. test -f am-one.el
  53. test -f sub/am-two.el
  54. test -f x/y/z/am-three.el
  55. # Byte-compiling only a subset of the elisp files.
  56. $MAKE am-one.elc sub/am-two.elc
  57. test -f am-one.elc
  58. test -f sub/am-two.elc
  59. test ! -e x/y/z/am-three.elc
  60. rm -f am-one.elc sub/am-two.elc
  61. $MAKE x/y/z/am-three.elc
  62. test ! -e am-one.elc
  63. test ! -e sub/am-two.elc
  64. test -f x/y/z/am-three.elc
  65. $MAKE distcheck
  66. :