Makefile.am 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. ## Process this file with automake to produce Makefile.in
  2. # SPDX-License-Identifier: GPL-3.0-or-later
  3. # Copyright © 2000-2012 Free Software Foundation, Inc.
  4. # Copyright © 2020-2022 GNUnet e.V.
  5. #
  6. # Author (GnuTLS): Nikos Mavrogiannopoulos
  7. # Author (scheme-GNUnet): Maxime Devos
  8. #
  9. # This file was part of scheme-GNUnet.
  10. #
  11. # scheme-GNUnet is free software; you can redistribute it and/or modify it
  12. # under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 3 of the License, or (at
  14. # your option) any later version.
  15. #
  16. # scheme-GNUnet is distributed in the hope that it will be useful, but
  17. # WITHOUT ANY WARRANTY; without even the implied warranty of
  18. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. # GNU General Public License for more details.
  20. #
  21. # You should have received a copy of the GNU General Public License
  22. # along with scheme-GNUnet. If not, see <http://www.gnu.org/licenses/>.
  23. # This file is partially based upon guile/Makefile.am in GnuTLS.
  24. # Not all scheme-GNUnet code is licensed as GPL, some is licensed as AGPL.
  25. ACLOCAL_AMFLAGS = -I m4
  26. AM_CPPFLAGS = -I$(top_srcdir)/include
  27. SUFFIXES = .scm .go
  28. # These scripts are more of a demo than something
  29. # that actually works, so don't compile or install
  30. # them.
  31. #
  32. # gnu/gnunet/scripts/download-store.scm
  33. # gnu/gnunet/scripts/publish-store.scm
  34. # gnu/gnunet/scripts/guix-stuff.scm
  35. # Scheme code that works
  36. modules = \
  37. web/form.scm \
  38. \
  39. gnu/extractor/enum.scm \
  40. \
  41. \
  42. gnu/gnunet/message/protocols.scm \
  43. \
  44. gnu/gnunet/concurrency/update.scm \
  45. gnu/gnunet/concurrency/repeated-condition.scm \
  46. gnu/gnunet/concurrency/lost-and-found.scm \
  47. \
  48. gnu/gnunet/mq/envelope.scm \
  49. gnu/gnunet/mq/error-reporting.scm \
  50. gnu/gnunet/mq/handler.scm \
  51. gnu/gnunet/mq/prio-prefs.scm \
  52. gnu/gnunet/mq/prio-prefs2.scm \
  53. gnu/gnunet/mq.scm \
  54. \
  55. gnu/gnunet/mq-impl/stream.scm \
  56. \
  57. gnu/gnunet/utils/bv-slice.scm \
  58. gnu/gnunet/utils/hat-let.scm \
  59. gnu/gnunet/utils/cut-syntax.scm \
  60. gnu/gnunet/utils/netstruct.scm \
  61. gnu/gnunet/utils/platform-enum.scm \
  62. gnu/gnunet/utils/tokeniser.scm \
  63. \
  64. gnu/gnunet/block.scm \
  65. \
  66. gnu/gnunet/cadet/client.scm \
  67. gnu/gnunet/cadet/network.scm \
  68. gnu/gnunet/cadet/struct.scm \
  69. \
  70. gnu/gnunet/config/parser.scm \
  71. gnu/gnunet/config/value-parser.scm \
  72. gnu/gnunet/config/expand.scm \
  73. gnu/gnunet/config/db.scm \
  74. gnu/gnunet/config/fs.scm \
  75. \
  76. gnu/gnunet/crypto.scm \
  77. gnu/gnunet/crypto/struct.scm \
  78. \
  79. gnu/gnunet/dht/client.scm \
  80. gnu/gnunet/dht/network.scm \
  81. gnu/gnunet/dht/struct.scm \
  82. \
  83. gnu/gnunet/util/cmsg.scm \
  84. gnu/gnunet/util/time.scm \
  85. gnu/gnunet/icmp/struct.scm \
  86. \
  87. gnu/gnunet/util/struct.scm \
  88. gnu/gnunet/hashcode/struct.scm \
  89. \
  90. gnu/gnunet/nse/client.scm \
  91. gnu/gnunet/nse/struct.scm \
  92. \
  93. gnu/gnunet/netstruct/procedural.scm \
  94. gnu/gnunet/netstruct/syntactic.scm \
  95. \
  96. gnu/gnunet/server.scm
  97. GOBJECTS = $(modules:%.scm=%.go)
  98. nobase_dist_guilesite_DATA = $(modules) gnu/gnunet/config/default.conf
  99. E = gnu/gnunet/message/enum-
  100. scmfrags = \
  101. gnu/gnunet/message/protocols.scmgen \
  102. $(E)agpl.scmfrag \
  103. $(E)arm.scmfrag \
  104. $(E)ats.scmfrag \
  105. $(E)cadet.scmfrag \
  106. $(E)chat.scmfrag \
  107. $(E)consensus.scmfrag \
  108. $(E)conversation.scmfrag \
  109. $(E)core.scmfrag \
  110. $(E)datastore.scmfrag \
  111. $(E)dht.scmfrag \
  112. $(E)fragment.scmfrag \
  113. $(E)fs-publish.scmfrag \
  114. $(E)fs.scmfrag \
  115. $(E)gns.scmfrag \
  116. $(E)hello.scmfrag \
  117. $(E)identity.scmfrag \
  118. $(E)lockmanager.scmfrag \
  119. $(E)multicast.scmfrag \
  120. $(E)namecache.scmfrag \
  121. $(E)namestore.scmfrag \
  122. $(E)nse.scmfrag \
  123. $(E)peerinfo.scmfrag \
  124. $(E)psyc.scmfrag \
  125. $(E)psycstore.scmfrag \
  126. $(E)regex.scmfrag \
  127. $(E)resolver.scmfrag \
  128. $(E)revocation.scmfrag \
  129. $(E)scalarproduct.scmfrag \
  130. $(E)set.scmfrag \
  131. $(E)statistics.scmfrag \
  132. $(E)testbed.scmfrag \
  133. $(E)transport-dv.scmfrag \
  134. $(E)transport.scmfrag \
  135. $(E)util.scmfrag \
  136. $(E)vpn-dns.scmfrag \
  137. $(E)vpn.scmfrag \
  138. $(E)wlan.scmfrag
  139. nobase_dist_guilesite_DATA += $(scmfrags)
  140. # Recompile protocols.go whenever one of the scmfrag files change.
  141. gnu/gnunet/message/protocols.go : $(scmfrags)
  142. # Scheme code compilation
  143. nobase_nodist_guilesiteccache_DATA = $(GOBJECTS)
  144. # Do not unset 'GUILE_LOAD_COMPILED_PATH', as guile-pfds as installed
  145. # in Guix does not have .scm files (but it does in Guile).
  146. # XXX: Use the C locale for when Guile lacks
  147. # <https://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
  148. %.go: %.scm
  149. $(AM_V_GUILEC)$(MKDIR_P) "`dirname "$@"`" ; \
  150. $(AM_V_P) && out=1 || out=- ; \
  151. LC_ALL=C \
  152. builddir="$(top_builddir)" \
  153. GUILE_AUTO_COMPILE=0 \
  154. $(GUILD) compile -O2 --target="$(host)" \
  155. -L "$(top_srcdir)" \
  156. -Wformat -Wunbound-variable -Warity-mismatch \
  157. -o "$@" "$<" >&$$out
  158. TEST_EXTENSIONS = .scm
  159. TESTS =
  160. # Scheme tests
  161. # FIXME ./pre-inst-env & ./test-env
  162. #
  163. # Set --auto-compile, because ‘tests/envelope.scm - references dropped after
  164. # sent’ requires optimisation to avoid keeping references. Set XDG_CACHE_HOME
  165. # because $HOME may be unwritable and to reduce clutter.
  166. SCM_LOG_DRIVER = \
  167. env XDG_CACHE_HOME="$(abs_builddir)" $(GUILE) --auto-compile -L \
  168. $(top_srcdir) -C $(top_builddir) -e main \
  169. $(top_srcdir)/build-aux/test-driver.scm
  170. SCM_TESTS = \
  171. tests/envelope.scm \
  172. tests/error-reporting.scm \
  173. tests/message-handler.scm \
  174. tests/mq.scm \
  175. tests/mq-stream.scm \
  176. tests/network-size.scm \
  177. tests/update.scm \
  178. tests/repeated-condition.scm \
  179. tests/bv-slice.scm \
  180. tests/cmsg.scm \
  181. tests/config-parser.scm \
  182. tests/config-value-parser.scm \
  183. tests/config-expand.scm \
  184. tests/config-db.scm \
  185. tests/config-fs.scm \
  186. tests/cadet.scm \
  187. tests/crypto.scm \
  188. tests/distributed-hash-table.scm \
  189. tests/form.scm \
  190. tests/lost-and-found.scm \
  191. tests/netstruct.scm \
  192. tests/time.scm \
  193. tests/tokeniser.scm
  194. SCM_TESTS_ENVIRONMENT = \
  195. GUILE_AUTO_COMPILE=0 \
  196. GUILE_WARN_DEPRECATED=detailed
  197. TESTS += $(SCM_TESTS)
  198. EXTRA_DIST = $(SCM_TESTS) tests/utils.scm build-aux/test-driver.scm
  199. # For documentation (TODO regenerate indices).
  200. # Set HOME to avoid interfering with the user's TeXmacs
  201. # configuration and because HOME can be unwritable.
  202. #
  203. # --auto-servernum is required to let multiple xvfb-run
  204. # run concurrently.
  205. TEXMACS_CONVERT = env "HOME=$(abs_builddir)" xvfb-run --auto-servernum -- texmacs
  206. # Use MathML for formulae instead of PNG images.
  207. # While the images are prettier than the rendering by the browser,
  208. # they aren't accessible and it is somewhat difficult to tell Automake
  209. # to install the PNG images.
  210. TEXMACS_HTML_SETTINGS = \
  211. '(set-boolean-preference "texmacs->html:images" \#f)\
  212. (set-boolean-preference "texmacs->html:mathjax" \#f)\
  213. (set-boolean-preference "texmacs->html:mathml" \#t)'
  214. tm_fragments = \
  215. doc/configuration.tm doc/contributing.tm doc/distributed-hash-table.tm \
  216. doc/network-size-estimation.tm doc/network-structures.tm \
  217. doc/service-communication.tm
  218. doc/scheme-gnunet.pdf: doc/scheme-gnunet.tm $(tm_fragments)
  219. $(TEXMACS_CONVERT) -c "$<" "$@" -q
  220. doc/scheme-gnunet.html: doc/scheme-gnunet.tm $(tm_fragments)
  221. $(TEXMACS_CONVERT) -x $(TEXMACS_HTML_SETTINGS) -c "$<" "$@" -q
  222. dist_doc_DATA = doc/scheme-gnunet.tm $(tm_fragments) doc/fdl.tm
  223. nobase_dist_doc_DATA = examples/web.scm
  224. nodist_html_DATA = doc/scheme-gnunet.html
  225. nodist_pdf_DATA = doc/scheme-gnunet.pdf
  226. clean-local:
  227. rm -f $(GOBJECTS)