guilec 1.5 KB

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