local.mk 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. # local.mk --- Local Automake file for emacs-lisp code -*- makefile-automake -*-
  2. # Copyright © 2014–2017 Alex Kost <alezost@gmail.com>
  3. # Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
  4. # This file is part of Emacs-Guix.
  5. # Emacs-Guix is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # Emacs-Guix is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with Emacs-Guix. If not, see <http://www.gnu.org/licenses/>.
  17. AM_V_ELC = $(AM_V_ELC_$(V))
  18. AM_V_ELC_ = $(AM_V_ELC_$(AM_DEFAULT_VERBOSITY))
  19. AM_V_ELC_0 = @echo " ELC " $@;
  20. AM_ELCFLAGS = -L "$(abs_builddir)/%D%" -L "$(abs_srcdir)/%D%"
  21. if GEISER_DIR
  22. AM_ELCFLAGS += -L "$(geiserlispdir)"
  23. endif
  24. if DASH_DIR
  25. AM_ELCFLAGS += -L "$(dashlispdir)"
  26. endif
  27. if BUI_DIR
  28. AM_ELCFLAGS += -L "$(builispdir)"
  29. endif
  30. if POPUP_DIR
  31. AM_ELCFLAGS += -L "$(popuplispdir)"
  32. endif
  33. if EMACS_Q
  34. AM_ELCFLAGS += -Q
  35. endif
  36. AM_ELCFLAGS += $(shell test -v GUIX_ENVIRONMENT && echo --no-site-file)
  37. AUTOLOADS = %D%/guix-autoloads.el
  38. EL_FILES = \
  39. %D%/guix.el \
  40. %D%/guix-config.el \
  41. %D%/guix-auto-mode.el \
  42. %D%/guix-utils.el \
  43. %D%/guix-external.el \
  44. %D%/guix-profiles.el \
  45. %D%/guix-scheme.el \
  46. %D%/guix-guile.el \
  47. %D%/guix-geiser.el \
  48. %D%/guix-repl.el \
  49. %D%/guix-help-vars.el \
  50. %D%/guix-read.el \
  51. %D%/guix-help.el \
  52. %D%/guix-about.el \
  53. %D%/guix-misc.el \
  54. %D%/guix-build-log.el \
  55. %D%/guix-command.el \
  56. %D%/guix-devel.el \
  57. %D%/guix-hydra.el \
  58. %D%/guix-hydra-build.el \
  59. %D%/guix-hydra-jobset.el \
  60. %D%/guix-graph.el \
  61. %D%/guix-hash.el \
  62. %D%/guix-derivation.el \
  63. %D%/guix-license.el \
  64. %D%/guix-location.el \
  65. %D%/guix-package.el \
  66. %D%/guix-pcomplete.el \
  67. %D%/guix-popup.el \
  68. %D%/guix-prettify.el \
  69. %D%/guix-ui-messages.el \
  70. %D%/guix-ui.el \
  71. %D%/guix-ui-license.el \
  72. %D%/guix-ui-location.el \
  73. %D%/guix-ui-profile.el \
  74. %D%/guix-ui-package.el \
  75. %D%/guix-ui-generation.el \
  76. %D%/guix-ui-system-generation.el \
  77. %D%/guix-ui-service.el
  78. # Elisp files generated from ".in".
  79. EL_GEN_FILES = %D%/guix-build-config.el
  80. ELC_FILES = $(EL_GEN_FILES:%.el=%.elc) $(EL_FILES:%.el=%.elc)
  81. dist_lisp_DATA = $(EL_FILES)
  82. nodist_lisp_DATA = \
  83. $(EL_GEN_FILES) \
  84. $(ELC_FILES) \
  85. $(AUTOLOADS)
  86. $(AUTOLOADS): $(EL_FILES)
  87. $(AM_V_GEN) $(EMACS) -Q --batch --eval \
  88. "(let ((backup-inhibited t) \
  89. (generated-autoload-file \"$(abs_builddir)/$(AUTOLOADS)\")) \
  90. (update-directory-autoloads \"$(abs_srcdir)/%D%\"))"
  91. $(ELC_FILES): %.elc: %.el
  92. -$(AM_V_ELC) $(EMACS) $(AM_ELCFLAGS) $(ELCFLAGS) --batch \
  93. --load "$(abs_top_srcdir)/build-aux/build-env.el" \
  94. -f batch-byte-compile $<
  95. CLEANFILES += $(ELC_FILES) $(AUTOLOADS)
  96. clean-lisp:
  97. -$(RM) -f $(ELC_FILES)
  98. clean-elc: clean-lisp
  99. .PHONY: clean-lisp clean-elc
  100. # local.mk ends here