lisp.am 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. ## automake - create Makefile.in from Makefile.am
  2. ## Copyright (C) 1996-2017 Free Software Foundation, Inc.
  3. ## This program is free software; you can redistribute it and/or modify
  4. ## it under the terms of the GNU General Public License as published by
  5. ## the Free Software Foundation; either version 2, or (at your option)
  6. ## any later version.
  7. ## This program is distributed in the hope that it will be useful,
  8. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. ## GNU General Public License for more details.
  11. ## You should have received a copy of the GNU General Public License
  12. ## along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. if %?INSTALL%
  14. include inst-vars.am
  15. endif %?INSTALL%
  16. ## ---------- ##
  17. ## Building. ##
  18. ## ---------- ##
  19. .el.elc:
  20. ## We add $(builddir) and $(srcdir) to load-path, so that any '.el' files
  21. ## that $< depends upon can be found (including generated ones).
  22. ## We prefer files from the build directory to those from the source
  23. ## directory, in true VPATH spirit.
  24. ## The destination file is normally determined by appending "c" to the
  25. ## input (which would erronously put it in $(srcdir) in VPATH builds),
  26. ## so we override that, too.
  27. if test "$(EMACS)" != "no"; then \
  28. am__dir=. am__subdir_includes=''; \
  29. case $@ in */*) \
  30. am__dir=`echo '$@' | sed 's,/[^/]*$$,,'`; \
  31. am__subdir_includes="-L $$am__dir -L $(srcdir)/$$am__dir"; \
  32. esac; \
  33. ## Emacs byte-compilation won't create this automatically, sadly.
  34. test -d "$$am__dir" || $(MKDIR_P) "$$am__dir" || exit 1; \
  35. $(EMACS) --batch \
  36. $(AM_ELCFLAGS) $(ELCFLAGS) \
  37. $$am__subdir_includes -L $(builddir) -L $(srcdir) \
  38. --eval "(defun byte-compile-dest-file (f) \"$@\")" \
  39. --eval "(unless (byte-compile-file \"$<\") (kill-emacs 1))"; \
  40. else :; fi
  41. ## ------------ ##
  42. ## Installing. ##
  43. ## ------------ ##
  44. if %?INSTALL%
  45. am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
  46. ?BASE?%DIR%LISP_INSTALL = $(INSTALL_DATA)
  47. ?!BASE?%DIR%LISP_INSTALL = $(install_sh_DATA)
  48. ?EXEC?.PHONY install-exec-am: install-%DIR%LISP
  49. ?!EXEC?.PHONY install-data-am: install-%DIR%LISP
  50. install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
  51. @$(NORMAL_INSTALL)
  52. ## Do not install anything if EMACS was not found.
  53. @if test "$(EMACS)" != no && test -n "$(%NDIR%dir)"; then \
  54. ?!BASE? $(am__vpath_adj_setup) \
  55. ## Funny invocation because Makefile variable can be empty, leading to
  56. ## a syntax error in sh.
  57. list='$(%DIR%_LISP)'; \
  58. if test -n "$$list"; then \
  59. echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
  60. $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
  61. fi; \
  62. for p in $$list; do \
  63. ## A lisp file can be in the source directory or the build directory.
  64. if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
  65. ?BASE? $(am__strip_dir) \
  66. ?!BASE? $(am__vpath_adj) \
  67. echo " $(%DIR%LISP_INSTALL) '$$d$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
  68. $(%DIR%LISP_INSTALL) "$$d$$p" "$(DESTDIR)$(%NDIR%dir)/$$f" || exit $$?; \
  69. ## Only install .elc file if it exists.
  70. if test -f $${p}c; then \
  71. echo " $(%DIR%LISP_INSTALL) '$${p}c' '$(DESTDIR)$(%NDIR%dir)/$${f}c'"; \
  72. $(%DIR%LISP_INSTALL) "$${p}c" "$(DESTDIR)$(%NDIR%dir)/$${f}c" || exit $$?; \
  73. else : ; fi; \
  74. done; \
  75. else : ; fi
  76. endif %?INSTALL%
  77. ## -------------- ##
  78. ## Uninstalling. ##
  79. ## -------------- ##
  80. if %?INSTALL%
  81. .PHONY uninstall-am: uninstall-%DIR%LISP
  82. uninstall-%DIR%LISP:
  83. @$(NORMAL_UNINSTALL)
  84. ## Do not uninstall anything if EMACS was not found.
  85. @test "$(EMACS)" != no && test -n "$(%NDIR%dir)" || exit 0; \
  86. list='$(%DIR%_LISP)'; \
  87. ?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
  88. ?!BASE? $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
  89. files="$$files "`echo "$$files" | sed 's|$$|c|'`; \
  90. dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
  91. endif %?INSTALL%
  92. ## ---------- ##
  93. ## Cleaning. ##
  94. ## ---------- ##
  95. .PHONY clean-am: clean-lisp
  96. clean-lisp:
  97. -rm -f $(ELCFILES)
  98. ## -------------- ##
  99. ## Distributing. ##
  100. ## -------------- ##
  101. if %?DIST%
  102. DIST_COMMON += %DISTVAR%
  103. endif %?DIST%