summaryrefslogtreecommitdiff
path: root/bootstrap/Makefile.am
blob: 093ee8540a7d7d8958efa814a8b9c2baa9b7eca0 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
## Process this file with automake to produce Makefile.in.
##
##  	Copyright (C) 2009, 2010, 2011, 2012, 2013,
##        2014, 2015 Free Software Foundation, Inc.
##
##   This file is part of GUILE.
##
##   GUILE is free software; you can redistribute it and/or modify it
##   under the terms of the GNU Lesser General Public License as
##   published by the Free Software Foundation; either version 3, or
##   (at your option) any later version.
##
##   GUILE is distributed in the hope that it will be useful, but
##   WITHOUT ANY WARRANTY; without even the implied warranty of
##   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##   GNU Lesser General Public License for more details.
##
##   You should have received a copy of the GNU Lesser General Public
##   License along with GUILE; see the file COPYING.LESSER.  If not,
##   write to the Free Software Foundation, Inc., 51 Franklin Street,
##   Fifth Floor, Boston, MA 02110-1301 USA


GOBJECTS = $(SOURCES:%.scm=%.go)
GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
GUILE_OPTIMIZATIONS = -O1
nobase_noinst_DATA = $(GOBJECTS) ice-9/eval.go
CLEANFILES = $(GOBJECTS) ice-9/eval.go ice-9/psyntax-pp.go

# We must build the evaluator first, so that we can be sure to control
# the stack.  Then we really need to build the expander before other
# things, otherwise the compile time for everything else is dominated by
# the expander.
ice-9/psyntax-pp.go: ice-9/eval.go
$(GOBJECTS): ice-9/psyntax-pp.go

VM_TARGETS := system/vm/assembler.go system/vm/disassembler.go
$(VM_TARGETS): $(top_builddir)/libguile/vm-operations.h

AM_V_GUILEC = $(AM_V_GUILEC_$(V))
AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
AM_V_GUILEC_0 = @echo "  BOOTSTRAP GUILEC" $@;

vpath %.scm @srcdir@/../module

SUFFIXES = .scm .go

.scm.go:
	$(AM_V_GUILEC)GUILE_AUTO_COMPILE=0			\
	$(top_builddir)/meta/uninstalled-env			\
	guild compile --target="$(host)"                        \
          $(GUILE_WARNINGS) $(GUILE_OPTIMIZATIONS)              \
	  -L "$(abs_top_srcdir)/module"                         \
	  -L "$(abs_top_srcdir)/guile-readline"			\
	  -o "$@" "$<"

# A subset of sources that are used by the compiler.  We can compile
# these in any order; the order below is designed to hopefully result in
# the lowest total compile time.
SOURCES =					\
  language/cps/intmap.scm			\
  language/cps/intset.scm			\
  language/cps/utils.scm			\
  ice-9/vlist.scm				\
  srfi/srfi-1.scm				\
						\
  language/tree-il.scm				\
  language/tree-il/analyze.scm			\
  language/tree-il/canonicalize.scm		\
  language/tree-il/compile-cps.scm		\
  language/tree-il/debug.scm			\
  language/tree-il/effects.scm			\
  language/tree-il/fix-letrec.scm		\
  language/tree-il/optimize.scm			\
  language/tree-il/peval.scm			\
  language/tree-il/primitives.scm		\
  language/tree-il/spec.scm			\
						\
  language/cps.scm				\
  language/cps/closure-conversion.scm		\
  language/cps/compile-bytecode.scm		\
  language/cps/constructors.scm			\
  language/cps/contification.scm		\
  language/cps/cse.scm				\
  language/cps/dce.scm				\
  language/cps/effects-analysis.scm		\
  language/cps/elide-values.scm			\
  language/cps/licm.scm				\
  language/cps/peel-loops.scm			\
  language/cps/primitives.scm			\
  language/cps/prune-bailouts.scm		\
  language/cps/prune-top-level-scopes.scm	\
  language/cps/reify-primitives.scm		\
  language/cps/renumber.scm			\
  language/cps/rotate-loops.scm			\
  language/cps/optimize.scm			\
  language/cps/simplify.scm			\
  language/cps/self-references.scm		\
  language/cps/slot-allocation.scm		\
  language/cps/spec.scm				\
  language/cps/specialize-primcalls.scm		\
  language/cps/split-rec.scm			\
  language/cps/type-checks.scm			\
  language/cps/type-fold.scm			\
  language/cps/types.scm			\
  language/cps/verify.scm			\
  language/cps/with-cps.scm			\
						\
  language/scheme/spec.scm			\
  language/scheme/compile-tree-il.scm		\
  language/scheme/decompile-tree-il.scm		\
						\
  language/bytecode.scm				\
  language/bytecode/spec.scm			\
						\
  language/value/spec.scm			\
						\
  system/base/pmatch.scm			\
  system/base/syntax.scm			\
  system/base/compile.scm			\
  system/base/language.scm			\
  system/base/lalr.scm				\
  system/base/message.scm			\
  system/base/target.scm			\
  system/base/types.scm				\
  system/base/ck.scm				\
						\
  ice-9/boot-9.scm				\
  ice-9/r5rs.scm				\
  ice-9/deprecated.scm				\
  ice-9/binary-ports.scm			\
  ice-9/command-line.scm			\
  ice-9/control.scm				\
  ice-9/format.scm				\
  ice-9/getopt-long.scm				\
  ice-9/i18n.scm				\
  ice-9/match.scm				\
  ice-9/networking.scm				\
  ice-9/posix.scm				\
  ice-9/rdelim.scm				\
  ice-9/receive.scm				\
  ice-9/regex.scm				\
  ice-9/session.scm				\
  ice-9/pretty-print.scm			\
						\
  system/vm/assembler.scm			\
  system/vm/debug.scm				\
  system/vm/disassembler.scm			\
  system/vm/dwarf.scm				\
  system/vm/elf.scm				\
  system/vm/frame.scm				\
  system/vm/linker.scm				\
  system/vm/loader.scm				\
  system/vm/program.scm				\
  system/vm/vm.scm				\
  system/foreign.scm