Makefile.am 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Makefile.am --- GNU Automake file to build guile modules
  2. # Copyright (C) 2016 Alex Kost <alezost@gmail.com>
  3. # This file is part of Guile-XOSD.
  4. # Guile-XOSD 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. # Guile-XOSD 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 Guile-XOSD. If not, see <http://www.gnu.org/licenses/>.
  16. xosd-procedures.txt: $(top_srcdir)/doc/procedures.texi
  17. $(GUILE) --no-auto-compile \
  18. "$(top_srcdir)/build-aux/texi-to-docstrings.scm" \
  19. "$<" > $@
  20. MODULES = \
  21. xosd/bindings.scm \
  22. xosd.scm
  23. CONFIG_SCM = xosd/config.scm
  24. CONFIG_GO = $(CONFIG_SCM:%.scm=%.go)
  25. GO_FILES = $(CONFIG_GO) $(MODULES:%.scm=%.go)
  26. $(GO_FILES): $(abs_top_builddir)/src/libguile-xosd.la
  27. nobase_dist_guilemodule_DATA = $(MODULES)
  28. nobase_nodist_guilemodule_DATA = $(CONFIG_SCM) xosd-procedures.txt
  29. nobase_nodist_guileccache_DATA = $(GO_FILES)
  30. # Make sure source files are installed first, so that the mtime of
  31. # installed compiled files is greater than that of installed source
  32. # files. See
  33. # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>.
  34. guile_xosd_install_go_files = install-nobase_nodist_guileccacheDATA
  35. $(guile_xosd_install_go_files): install-nobase_dist_guilemoduleDATA
  36. $(guile_xosd_install_go_files): install-nobase_nodist_guilemoduleDATA
  37. # Add both srcdir and builddir to GUILE_LOAD_PATH because the generated
  38. # "config.scm" file is placed in the builddir.
  39. GUILEC_ENV = \
  40. GUILE_AUTO_COMPILE=0 \
  41. GUILE_LOAD_PATH="$(abs_srcdir):$(abs_builddir)" \
  42. GUILE_LOAD_COMPILED_PATH="$(abs_builddir)" \
  43. GUILE_XOSD_LIBDIR="$(abs_top_builddir)/src/.libs"
  44. GUILEC_OPTS = \
  45. --target=$(host) \
  46. -Warity-mismatch \
  47. -Wformat \
  48. -Wunbound-variable \
  49. -Wunused-variable
  50. $(GO_FILES): %.go: %.scm
  51. $(GUILEC_ENV) $(GUILD) compile $(GUILEC_OPTS) --output=$@ $<
  52. CLEANFILES = $(GO_FILES)
  53. clean-go:
  54. -$(RM) -f $(GO_FILES)
  55. .PHONY: clean-go
  56. # Makefile.am ends here