Makefile.am 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # Makefile.am --- GNU Automake file to build guile modules
  2. # Copyright © 2016 Alex Kost <alezost@gmail.com>
  3. # This file is part of Emacs-Guix.
  4. # Emacs-Guix 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 3 of the License, or
  7. # (at your option) any later version.
  8. #
  9. # Emacs-Guix 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 Emacs-Guix. If not, see <http://www.gnu.org/licenses/>.
  16. MODULES = \
  17. emacs-guix/utils.scm \
  18. emacs-guix/graph.scm \
  19. emacs-guix/lint.scm \
  20. emacs-guix/refresh.scm \
  21. emacs-guix/commands.scm \
  22. emacs-guix/licenses.scm \
  23. emacs-guix/packages.scm \
  24. emacs-guix/locations.scm \
  25. emacs-guix/generations.scm \
  26. emacs-guix/system-generations.scm \
  27. emacs-guix/actions.scm \
  28. emacs-guix.scm
  29. GO_FILES = $(MODULES:%.scm=%.go)
  30. nobase_dist_guilemodule_DATA = $(MODULES)
  31. nobase_nodist_guileccache_DATA = $(GO_FILES)
  32. # Make sure source files are installed first, so that the mtime of
  33. # installed compiled files is greater than that of installed source
  34. # files. See
  35. # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>.
  36. guile_install_go_files = install-nobase_nodist_guileccacheDATA
  37. $(guile_install_go_files): install-nobase_dist_guilemoduleDATA
  38. GUILEC_ENV = \
  39. GUILE_AUTO_COMPILE=0
  40. GUILEC_OPTS = \
  41. -Warity-mismatch \
  42. -Wformat \
  43. -Wunbound-variable
  44. if GUIX_DIR
  45. GUILEC_ENV += \
  46. GUILE_LOAD_PATH="$(abs_srcdir):$(guixmoduledir)" \
  47. GUILE_LOAD_COMPILED_PATH="$(abs_builddir):$(guixccachedir)"
  48. else
  49. GUILEC_ENV += \
  50. GUILE_LOAD_PATH="$(abs_srcdir):$$GUILE_LOAD_PATH" \
  51. GUILE_LOAD_COMPILED_PATH="$(abs_builddir):$$GUILE_LOAD_COMPILED_PATH"
  52. endif
  53. $(GO_FILES): %.go: %.scm
  54. -$(AM_V_GEN) $(GUILEC_ENV) $(GUILD) compile $(GUILEC_OPTS) --output=$@ $<
  55. CLEANFILES = $(GO_FILES)
  56. clean-go:
  57. -$(RM) -f $(GO_FILES)
  58. .PHONY: clean-go
  59. # Makefile.am ends here