Makefile.am 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # Joy -- implementation of the Joy programming language
  2. # Copyright © 2016, 2017, 2020 Eric Bavier <bavier@member.fsf.org>
  3. #
  4. # Joy is free software; you can redistribute it and/or modify it under
  5. # the terms of the GNU General Public License as published by the Free
  6. # Software Foundation; either version 3 of the License, or (at your
  7. # option) any later version.
  8. #
  9. # Joy is distributed in the hope that it will be useful, but WITHOUT
  10. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  11. # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  12. # License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with Joy. If not, see <http://www.gnu.org/licenses/>.
  16. bin_SCRIPTS = \
  17. scripts/joy
  18. MODULES = \
  19. language/joy/lexer.scm \
  20. language/joy/parser.scm \
  21. language/joy/compile-tree-il.scm \
  22. language/joy/primitives.scm \
  23. language/joy/write.scm \
  24. language/joy/eval.scm \
  25. language/joy/spec.scm \
  26. language/joy-repl/spec.scm \
  27. joy/ui.scm \
  28. $(EMPTY)
  29. JOY_MODULES = \
  30. lib/joy/base.joy \
  31. lib/joy/forth.joy \
  32. $(EMPTY)
  33. joymoduledir = $(pkglibdir)
  34. dist_joymodule_DATA = $(JOY_MODULES)
  35. nobase_dist_guilemodule_DATA = $(MODULES)
  36. nobase_nodist_guilemodule_DATA = joy/config.scm
  37. GOBJECTS = $(MODULES:%.scm=%.go) joy/config.go
  38. nobase_nodist_guileobject_DATA = $(GOBJECTS)
  39. # Flags passed to 'guild compile'.
  40. GUILD_COMPILE_FLAGS = \
  41. -Wformat -Wunbound-variable -Warity-mismatch
  42. .scm.go:
  43. $(AM_V_GUILEC)$(MKDIR_P) `dirname $@`; \
  44. unset GUILE_LOAD_COMPILED_PATH ; \
  45. $(AM_V_P) || exec >/dev/null; \
  46. LC_ALL=C \
  47. $(top_builddir)/pre-inst-env \
  48. $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \
  49. $(GUILD_COMPILE_FLAGS) --target="$(host)" \
  50. -o "$@" "$<"
  51. SUFFIXES = .go
  52. edit = sed \
  53. -e 's|@GUILE[@]|$(GUILE)|g' \
  54. -e 's|@prefix[@]|$(prefix)|g' \
  55. -e 's|@joymoduledir[@]|$(joymoduledir)|g' \
  56. -e 's|@guilemoduledir[@]|$(guilemoduledir)|g' \
  57. -e 's|@guileobjectdir[@]|$(guileobjectdir)|g'
  58. scripts/joy: scripts/joy.in Makefile
  59. $(AM_V_GEN)rm -f $@ $@.tmp
  60. $(AM_V_at)$(MKDIR_P) $(@D)
  61. $(AM_V_at)$(edit) $< >$@.tmp
  62. $(AM_V_at)chmod +x $@.tmp
  63. $(AM_V_at)chmod a-w $@.tmp
  64. $(AM_V_at)mv $@.tmp $@
  65. EXTRA_DIST = \
  66. .dir-locals.el \
  67. bootstrap \
  68. guix.scm \
  69. scripts/joy.in \
  70. $(EMPTY)
  71. CLEANFILES = \
  72. $(GOBJECTS) \
  73. $(JOY_TESTS:tests/%.scm=%.log) \
  74. scripts/joy \
  75. $(EMPTY)
  76. DISTCLEANFILES = \
  77. $(EMPTY)
  78. include doc.am
  79. include tests.am
  80. AM_V_GUILEC = $(AM_V_GUILEC_$(V))
  81. AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
  82. AM_V_GUILEC_0 = @echo " GUILEC " $@;