guilec 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # -*- makefile -*-
  2. GOBJECTS = $(SOURCES:%.scm=%.go) $(ELISP_SOURCES:%.el=%.go)
  3. GUILE_WARNINGS ?= -W1
  4. GUILE_OPTIMIZATIONS ?= -O2
  5. moddir = $(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)/$(modpath)
  6. nobase_mod_DATA = $(SOURCES) $(ELISP_SOURCES) $(NOCOMP_SOURCES)
  7. ccachedir = $(pkglibdir)/$(GUILE_EFFECTIVE_VERSION)/ccache/$(modpath)
  8. nobase_ccache_DATA = $(GOBJECTS)
  9. EXTRA_DIST = $(SOURCES) $(ELISP_SOURCES) $(NOCOMP_SOURCES)
  10. ETAGS_ARGS = $(SOURCES) $(ELISP_SOURCES) $(NOCOMP_SOURCES)
  11. CLEANFILES = $(GOBJECTS)
  12. # Make sure source files are installed first, so that the mtime of
  13. # installed compiled files is greater than that of installed source
  14. # files. See
  15. # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
  16. # for details.
  17. guile_install_go_files = install-nobase_ccacheDATA
  18. $(guile_install_go_files): install-nobase_modDATA
  19. AM_V_GUILEC = $(AM_V_GUILEC_$(V))
  20. AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
  21. AM_V_GUILEC_0 = @echo " GUILEC" $@;
  22. SUFFIXES = .scm .el .go
  23. .scm.go:
  24. $(AM_V_GUILEC)GUILE_AUTO_COMPILE=0 \
  25. $(top_builddir)/meta/build-env \
  26. guild compile --target="$(host)" $(GUILE_WARNINGS) $(GUILE_OPTIMIZATIONS) \
  27. -L "$(abs_srcdir)" -L "$(abs_builddir)" \
  28. -L "$(abs_top_srcdir)/guile-readline" \
  29. -o "$@" "$<"
  30. .el.go:
  31. $(AM_V_GUILEC)GUILE_AUTO_COMPILE=0 \
  32. $(top_builddir)/meta/build-env \
  33. guild compile --target="$(host)" $(GUILE_WARNINGS) $(GUILE_OPTIMIZATIONS) \
  34. -L "$(abs_srcdir)" -L "$(abs_builddir)" \
  35. -L "$(abs_top_srcdir)/guile-readline" \
  36. --from=elisp -o "$@" "$<"