bootstrap.am 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. ## Copyright (C) 2009-2023 Free Software Foundation, Inc.
  2. ##
  3. ## This file is part of GNU Guile.
  4. ##
  5. ## GNU Guile is free software; you can redistribute it and/or modify
  6. ## it under the terms of the GNU Lesser General Public License as
  7. ## published by the Free Software Foundation; either version 3, or (at
  8. ## your option) any later version.
  9. ##
  10. ## GNU Guile is distributed in the hope that it will be useful, but
  11. ## WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ## GNU Lesser General Public License for more details.
  14. ##
  15. ## You should have received a copy of the GNU Lesser General Public
  16. ## License along with GNU Guile; see the file COPYING.LESSER. If not,
  17. ## write to the Free Software Foundation, Inc., 51 Franklin Street,
  18. ## Fifth Floor, Boston, MA 02110-1301 USA
  19. # These variables can be set before you include bootstrap.am.
  20. GUILE_WARNINGS ?= -W1
  21. GUILE_OPTIMIZATIONS ?= -O2
  22. GUILE_TARGET ?= $(host)
  23. GUILE_BUILD_TAG ?= BOOTSTRAP($(GUILE_BOOTSTRAP_STAGE))
  24. GOBJECTS = $(SOURCES:%.scm=%.go) $(ELISP_SOURCES:%.el=%.go)
  25. nobase_noinst_DATA = $(GOBJECTS)
  26. CLEANFILES = $(GOBJECTS)
  27. VM_TARGETS = system/vm/assembler.go system/vm/disassembler.go
  28. $(VM_TARGETS): $(top_builddir)/libguile/vm-operations.h
  29. AM_V_GUILEC = $(AM_V_GUILEC_$(V))
  30. AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
  31. AM_V_GUILEC_0 = @echo " $(GUILE_BUILD_TAG) GUILEC" $@;
  32. vpath %.scm @top_srcdir@/module
  33. vpath %.el @top_srcdir@/module
  34. SUFFIXES = .scm .el .go
  35. COMPILE = $(AM_V_GUILEC) \
  36. GUILE_BOOTSTRAP_STAGE=$(GUILE_BOOTSTRAP_STAGE) \
  37. $(top_builddir)/meta/build-env \
  38. guild compile --target="$(GUILE_TARGET)" \
  39. $(GUILE_WARNINGS) $(GUILE_OPTIMIZATIONS) \
  40. -L "$(abs_top_srcdir)/module"
  41. .scm.go:
  42. $(COMPILE) -o "$@" "$<"
  43. .el.go:
  44. $(COMPILE) --from=elisp -o "$@" "$<"
  45. ice-9/boot-9.go: ice-9/boot-9.scm ice-9/quasisyntax.scm ice-9/r6rs-libraries.scm ice-9/r7rs-libraries.scm ice-9/read.scm
  46. ice-9/match.go: ice-9/match.scm ice-9/match.upstream.scm
  47. srfi/srfi-64.go: srfi/srfi-64.scm srfi/srfi-64/testing.scm
  48. # Keep this rule in sync with that in `am/guilec'.
  49. ice-9/psyntax-pp.go: ice-9/psyntax.scm ice-9/psyntax-pp.scm
  50. $(COMPILE) -o "$@" "$<"
  51. # All sources. We can compile these in any order; the order below is
  52. # designed to hopefully result in the lowest total compile time.
  53. SOURCES = \
  54. ice-9/eval.scm \
  55. ice-9/psyntax-pp.scm \
  56. ice-9/boot-9.scm \
  57. \
  58. language/tree-il.scm \
  59. language/tree-il/analyze.scm \
  60. language/tree-il/compile-bytecode.scm \
  61. language/tree-il/compile-cps.scm \
  62. language/tree-il/cps-primitives.scm \
  63. language/tree-il/debug.scm \
  64. language/tree-il/effects.scm \
  65. language/tree-il/eta-expand.scm \
  66. language/tree-il/fix-letrec.scm \
  67. language/tree-il/inlinable-exports.scm \
  68. language/tree-il/letrectify.scm \
  69. language/tree-il/optimize.scm \
  70. language/tree-il/peval.scm \
  71. language/tree-il/primitives.scm \
  72. language/tree-il/resolve-free-vars.scm \
  73. language/tree-il/spec.scm \
  74. \
  75. language/cps.scm \
  76. language/cps/closure-conversion.scm \
  77. language/cps/compile-bytecode.scm \
  78. language/cps/contification.scm \
  79. language/cps/cse.scm \
  80. language/cps/dce.scm \
  81. language/cps/devirtualize-integers.scm \
  82. language/cps/dump.scm \
  83. language/cps/elide-arity-checks.scm \
  84. language/cps/effects-analysis.scm \
  85. language/cps/graphs.scm \
  86. language/cps/intmap.scm \
  87. language/cps/intset.scm \
  88. language/cps/licm.scm \
  89. language/cps/optimize.scm \
  90. language/cps/peel-loops.scm \
  91. language/cps/prune-top-level-scopes.scm \
  92. language/cps/renumber.scm \
  93. language/cps/return-types.scm \
  94. language/cps/rotate-loops.scm \
  95. language/cps/self-references.scm \
  96. language/cps/simplify.scm \
  97. language/cps/slot-allocation.scm \
  98. language/cps/spec.scm \
  99. language/cps/specialize-primcalls.scm \
  100. language/cps/specialize-numbers.scm \
  101. language/cps/split-rec.scm \
  102. language/cps/switch.scm \
  103. language/cps/type-checks.scm \
  104. language/cps/type-fold.scm \
  105. language/cps/types.scm \
  106. language/cps/utils.scm \
  107. language/cps/verify.scm \
  108. language/cps/with-cps.scm \
  109. \
  110. language/cps/guile-vm.scm \
  111. language/cps/guile-vm/loop-instrumentation.scm\
  112. language/cps/guile-vm/lower-primcalls.scm \
  113. language/cps/guile-vm/reify-primitives.scm \
  114. \
  115. ice-9/and-let-star.scm \
  116. ice-9/arrays.scm \
  117. ice-9/atomic.scm \
  118. ice-9/binary-ports.scm \
  119. ice-9/buffered-input.scm \
  120. ice-9/calling.scm \
  121. ice-9/command-line.scm \
  122. ice-9/common-list.scm \
  123. ice-9/control.scm \
  124. ice-9/copy-tree.scm \
  125. ice-9/curried-definitions.scm \
  126. ice-9/custom-ports.scm \
  127. ice-9/deprecated.scm \
  128. ice-9/documentation.scm \
  129. ice-9/eval-string.scm \
  130. ice-9/exceptions.scm \
  131. ice-9/expect.scm \
  132. ice-9/fdes-finalizers.scm \
  133. ice-9/format.scm \
  134. ice-9/ftw.scm \
  135. ice-9/futures.scm \
  136. ice-9/gap-buffer.scm \
  137. ice-9/getopt-long.scm \
  138. ice-9/hash-table.scm \
  139. ice-9/hcons.scm \
  140. ice-9/history.scm \
  141. ice-9/i18n.scm \
  142. ice-9/iconv.scm \
  143. ice-9/lineio.scm \
  144. ice-9/list.scm \
  145. ice-9/local-eval.scm \
  146. ice-9/ls.scm \
  147. ice-9/match.scm \
  148. ice-9/networking.scm \
  149. ice-9/null.scm \
  150. ice-9/occam-channel.scm \
  151. ice-9/optargs.scm \
  152. ice-9/peg.scm \
  153. ice-9/peg/cache.scm \
  154. ice-9/peg/codegen.scm \
  155. ice-9/peg/simplify-tree.scm \
  156. ice-9/peg/string-peg.scm \
  157. ice-9/peg/using-parsers.scm \
  158. ice-9/poe.scm \
  159. ice-9/poll.scm \
  160. ice-9/popen.scm \
  161. ice-9/ports.scm \
  162. ice-9/posix.scm \
  163. ice-9/pretty-print.scm \
  164. ice-9/q.scm \
  165. ice-9/r5rs.scm \
  166. ice-9/rdelim.scm \
  167. ice-9/receive.scm \
  168. ice-9/regex.scm \
  169. ice-9/runq.scm \
  170. ice-9/rw.scm \
  171. ice-9/safe-r5rs.scm \
  172. ice-9/safe.scm \
  173. ice-9/sandbox.scm \
  174. ice-9/save-stack.scm \
  175. ice-9/scm-style-repl.scm \
  176. ice-9/serialize.scm \
  177. ice-9/session.scm \
  178. ice-9/slib.scm \
  179. ice-9/soft-ports.scm \
  180. ice-9/stack-catch.scm \
  181. ice-9/streams.scm \
  182. ice-9/string-fun.scm \
  183. ice-9/suspendable-ports.scm \
  184. ice-9/textual-ports.scm \
  185. ice-9/threads.scm \
  186. ice-9/time.scm \
  187. ice-9/top-repl.scm \
  188. ice-9/unicode.scm \
  189. ice-9/vlist.scm \
  190. ice-9/weak-vector.scm \
  191. \
  192. language/brainfuck/parse.scm \
  193. language/brainfuck/compile-scheme.scm \
  194. language/brainfuck/compile-tree-il.scm \
  195. language/brainfuck/spec.scm \
  196. \
  197. language/bytecode.scm \
  198. language/bytecode/spec.scm \
  199. \
  200. language/ecmascript/tokenize.scm \
  201. language/ecmascript/parse.scm \
  202. language/ecmascript/impl.scm \
  203. language/ecmascript/base.scm \
  204. language/ecmascript/function.scm \
  205. language/ecmascript/array.scm \
  206. language/ecmascript/compile-tree-il.scm \
  207. language/ecmascript/spec.scm \
  208. \
  209. language/elisp/falias.scm \
  210. language/elisp/lexer.scm \
  211. language/elisp/parser.scm \
  212. language/elisp/bindings.scm \
  213. language/elisp/compile-tree-il.scm \
  214. language/elisp/runtime.scm \
  215. language/elisp/runtime/function-slot.scm \
  216. language/elisp/runtime/value-slot.scm \
  217. language/elisp/spec.scm \
  218. \
  219. language/scheme/compile-tree-il.scm \
  220. language/scheme/decompile-tree-il.scm \
  221. language/scheme/spec.scm \
  222. \
  223. language/value/spec.scm \
  224. \
  225. rnrs/base.scm \
  226. rnrs/conditions.scm \
  227. rnrs/control.scm \
  228. rnrs/enums.scm \
  229. rnrs/eval.scm \
  230. rnrs/exceptions.scm \
  231. rnrs/files.scm \
  232. rnrs/hashtables.scm \
  233. rnrs/lists.scm \
  234. rnrs/mutable-pairs.scm \
  235. rnrs/mutable-strings.scm \
  236. rnrs/programs.scm \
  237. rnrs/r5rs.scm \
  238. rnrs/sorting.scm \
  239. rnrs/syntax-case.scm \
  240. rnrs/unicode.scm \
  241. rnrs/arithmetic/bitwise.scm \
  242. rnrs/arithmetic/fixnums.scm \
  243. rnrs/arithmetic/flonums.scm \
  244. rnrs/bytevectors.scm \
  245. rnrs/bytevectors/gnu.scm \
  246. rnrs/io/simple.scm \
  247. rnrs/io/ports.scm \
  248. rnrs/records/inspection.scm \
  249. rnrs/records/procedural.scm \
  250. rnrs/records/syntactic.scm \
  251. rnrs.scm \
  252. \
  253. oop/goops.scm \
  254. oop/goops/active-slot.scm \
  255. oop/goops/composite-slot.scm \
  256. oop/goops/describe.scm \
  257. oop/goops/internal.scm \
  258. oop/goops/save.scm \
  259. oop/goops/stklos.scm \
  260. oop/goops/accessors.scm \
  261. oop/goops/simple.scm \
  262. \
  263. scheme/base.scm \
  264. scheme/case-lambda.scm \
  265. scheme/char.scm \
  266. scheme/complex.scm \
  267. scheme/cxr.scm \
  268. scheme/eval.scm \
  269. scheme/file.scm \
  270. scheme/inexact.scm \
  271. scheme/lazy.scm \
  272. scheme/load.scm \
  273. scheme/process-context.scm \
  274. scheme/r5rs.scm \
  275. scheme/read.scm \
  276. scheme/repl.scm \
  277. scheme/time.scm \
  278. scheme/write.scm \
  279. \
  280. scripts/compile.scm \
  281. scripts/disassemble.scm \
  282. scripts/display-commentary.scm \
  283. scripts/doc-snarf.scm \
  284. scripts/frisk.scm \
  285. scripts/generate-autoload.scm \
  286. scripts/help.scm \
  287. scripts/lint.scm \
  288. scripts/list.scm \
  289. scripts/punify.scm \
  290. scripts/read-scheme-source.scm \
  291. scripts/read-text-outline.scm \
  292. scripts/use2dot.scm \
  293. scripts/snarf-check-and-output-texi.scm \
  294. scripts/summarize-guile-TODO.scm \
  295. scripts/api-diff.scm \
  296. scripts/read-rfc822.scm \
  297. scripts/snarf-guile-m4-docs.scm \
  298. scripts/autofrisk.scm \
  299. scripts/scan-api.scm \
  300. \
  301. srfi/srfi-1.scm \
  302. srfi/srfi-2.scm \
  303. srfi/srfi-4.scm \
  304. srfi/srfi-4/gnu.scm \
  305. srfi/srfi-6.scm \
  306. srfi/srfi-8.scm \
  307. srfi/srfi-9.scm \
  308. srfi/srfi-9/gnu.scm \
  309. srfi/srfi-10.scm \
  310. srfi/srfi-11.scm \
  311. srfi/srfi-13.scm \
  312. srfi/srfi-14.scm \
  313. srfi/srfi-16.scm \
  314. srfi/srfi-17.scm \
  315. srfi/srfi-18.scm \
  316. srfi/srfi-19.scm \
  317. srfi/srfi-26.scm \
  318. srfi/srfi-27.scm \
  319. srfi/srfi-28.scm \
  320. srfi/srfi-31.scm \
  321. srfi/srfi-34.scm \
  322. srfi/srfi-35.scm \
  323. srfi/srfi-37.scm \
  324. srfi/srfi-38.scm \
  325. srfi/srfi-41.scm \
  326. srfi/srfi-42.scm \
  327. srfi/srfi-43.scm \
  328. srfi/srfi-39.scm \
  329. srfi/srfi-45.scm \
  330. srfi/srfi-60.scm \
  331. srfi/srfi-64.scm \
  332. srfi/srfi-67.scm \
  333. srfi/srfi-69.scm \
  334. srfi/srfi-71.scm \
  335. srfi/srfi-88.scm \
  336. srfi/srfi-98.scm \
  337. srfi/srfi-111.scm \
  338. srfi/srfi-125.scm \
  339. srfi/srfi-126.scm \
  340. srfi/srfi-128.scm \
  341. srfi/srfi-151.scm \
  342. srfi/srfi-171.scm \
  343. srfi/srfi-171/gnu.scm \
  344. srfi/srfi-171/meta.scm \
  345. \
  346. statprof.scm \
  347. \
  348. system/base/pmatch.scm \
  349. system/base/syntax.scm \
  350. system/base/compile.scm \
  351. system/base/optimize.scm \
  352. system/base/language.scm \
  353. system/base/lalr.scm \
  354. system/base/message.scm \
  355. system/base/target.scm \
  356. system/base/types.scm \
  357. system/base/types/internal.scm \
  358. system/base/ck.scm \
  359. \
  360. system/foreign.scm \
  361. system/foreign-library.scm \
  362. system/foreign-object.scm \
  363. \
  364. system/repl/debug.scm \
  365. system/repl/error-handling.scm \
  366. system/repl/common.scm \
  367. system/repl/command.scm \
  368. system/repl/repl.scm \
  369. system/repl/server.scm \
  370. system/repl/coop-server.scm \
  371. \
  372. system/vm/assembler.scm \
  373. system/vm/coverage.scm \
  374. system/vm/debug.scm \
  375. system/vm/disassembler.scm \
  376. system/vm/dwarf.scm \
  377. system/vm/elf.scm \
  378. system/vm/frame.scm \
  379. system/vm/inspect.scm \
  380. system/vm/linker.scm \
  381. system/vm/loader.scm \
  382. system/vm/program.scm \
  383. system/vm/trace.scm \
  384. system/vm/trap-state.scm \
  385. system/vm/traps.scm \
  386. system/vm/vm.scm \
  387. \
  388. system/syntax.scm \
  389. \
  390. system/xref.scm \
  391. \
  392. sxml/apply-templates.scm \
  393. sxml/fold.scm \
  394. sxml/match.scm \
  395. sxml/simple.scm \
  396. sxml/ssax/input-parse.scm \
  397. sxml/ssax.scm \
  398. sxml/transform.scm \
  399. sxml/xpath.scm \
  400. \
  401. texinfo.scm \
  402. texinfo/docbook.scm \
  403. texinfo/html.scm \
  404. texinfo/indexing.scm \
  405. texinfo/string-utils.scm \
  406. texinfo/plain-text.scm \
  407. texinfo/reflection.scm \
  408. texinfo/serialize.scm \
  409. \
  410. web/client.scm \
  411. web/http.scm \
  412. web/request.scm \
  413. web/response.scm \
  414. web/server.scm \
  415. web/server/http.scm \
  416. web/uri.scm
  417. ELISP_SOURCES = \
  418. language/elisp/boot.el
  419. NOCOMP_SOURCES = \
  420. ice-9/match.upstream.scm \
  421. ice-9/psyntax.scm \
  422. ice-9/read.scm \
  423. ice-9/r6rs-libraries.scm \
  424. ice-9/r7rs-libraries.scm \
  425. ice-9/quasisyntax.scm \
  426. srfi/srfi-42/ec.scm \
  427. srfi/srfi-64/testing.scm \
  428. srfi/srfi-67/compare.scm \
  429. srfi/srfi-125/hash-table.scm \
  430. srfi/srfi-128/128.body1.scm \
  431. srfi/srfi-128/128.body2.scm \
  432. srfi/srfi-151/bitwise-33.scm \
  433. srfi/srfi-151/bitwise-60.scm \
  434. srfi/srfi-151/bitwise-other.scm \
  435. system/base/lalr.upstream.scm \
  436. system/repl/describe.scm \
  437. sxml/sxml-match.ss \
  438. sxml/upstream/SSAX.scm \
  439. sxml/upstream/SXML-tree-trans.scm \
  440. sxml/upstream/SXPath-old.scm \
  441. sxml/upstream/assert.scm \
  442. sxml/upstream/input-parse.scm