@@ -49,6 +49,7 @@ sub deps($target, *@deps) {
49
49
say (" $ target : { nqp :: join (' ' ,@ deps )} " );
50
50
}
51
51
52
+ # TODO is the version regenerated as often as it should
52
53
sub combine (: $ sources , : $ stage , : $ file , : $ gen-version = 0 ) {
53
54
54
55
my $ target := stage_path($ stage ) ~ $ file ;
@@ -147,29 +148,35 @@ say('js-install: js-all
147
148
constant (' JS_NQP_SOURCES' , ' $(COMMON_NQP_SOURCES)' );
148
149
149
150
150
- my $ p6regex-combined := combine(: stage(2 ), : sources(' $(P6QREGEX_SOURCES)' ), : file(' $(P6QREGEX_COMBINED)' ));
151
151
152
- my $ nqp-combined := combine(: stage(2 ), : sources(' $(JS_NQP_SOURCES)' ), : file(' $(NQP_COMBINED)' ));
152
+ my $ nqp-combined := combine(: stage(2 ), : sources(' $(JS_NQP_SOURCES)' ), : file(' $(NQP_COMBINED)' ), : gen-version( 1 ) );
153
153
154
154
constant (' JS_HLL_SOURCES' , ' src/vm/js/HLL/Backend.nqp $(COMMON_HLL_SOURCES)' );
155
155
156
156
my $ hll-combined := combine(: stage(2 ), : sources(' $(JS_HLL_SOURCES)' ), : file(' $(HLL_COMBINED)' ));
157
157
158
158
159
159
160
- # my $QAST-Compiler-moarvm := cross-compile(:stage(2), :source('src/vm/js/QAST/Compiler.nqp'), :target('QAST/Compiler'), :setting('NQPCORE'), :no-regex-lib(1), :deps([$nqpcore-moarvm, $QASTNode-moarvm]));
160
+ my $ QAST-Compiler-moarvm := cross-compile(: stage(2 ), : source(' src/vm/js/QAST/Compiler.nqp' ), : target(' QAST/Compiler' ), : setting(' NQPCORE' ), : no-regex-lib(1 ), : deps([$ nqpcore-moarvm , $ QASTNode-moarvm ]));
161
161
162
- my $ QAST-combined := combine(: stage(2 ), : sources(' $(JS_QAST_SOURCES)' ), : file(' $(QAST_COMBINED)' ));
163
- my $ QAST-moarvm := cross-compile(: stage(2 ), : source($ QAST-combined ), : target(' QAST' ), : setting(' NQPCORE' ), : no-regex-lib(1 ), : deps([$ nqpcore-moarvm , $ QASTNode-moarvm ]));
164
162
165
- my $ hll-moar := cross-compile(: stage(2 ), : source($ hll-combined ), : target(' NQPHLL' ), : setting(' NQPCORE' ), : no-regex-lib(1 ), : deps([$ nqpcore-moarvm , $ QAST-moarvm ]));
163
+ my $ QAST-moarvm := cross-compile(: stage(2 ), : source(' src/vm/js/QAST.nqp' ), : target(' QAST' ), : setting(' NQPCORE' ), : no-regex-lib(1 ), : deps([$ nqpcore-moarvm , $ QAST-Compiler-moarvm ]));
164
+
165
+
166
+ my $ hll-moar := cross-compile(: stage(2 ), : source($ hll-combined ), : target(' NQPHLL' ), : setting(' NQPCORE' ), : no-regex-lib(1 ), : deps([$ nqpcore-moarvm , $ QAST-Compiler-moarvm , $ QRegex-moarvm ]));
166
167
167
168
my $ p6qregex-combined := combine(: stage(2 ), : sources(' $(P6QREGEX_SOURCES)' ), : file(' $(P6QREGEX_COMBINED)' ));
168
169
169
170
170
171
171
- my $ NQPP6QRegex-moarvm := cross-compile(: stage(2 ), : source($ p6regex-combined ), : target(' NQPP6QRegex' ), : setting(' NQPCORE' ), : no-regex-lib(1 ), : deps([$ nqpcore-moarvm , $ QAST-moarvm , $ hll-moar ]));
172
+ my $ NQPP6QRegex-moarvm := cross-compile(: stage(2 ), : source($ p6qregex-combined ), : target(' NQPP6QRegex' ), : setting(' NQPCORE' ), : no-regex-lib(1 ), : deps([$ nqpcore-moarvm , $ QAST-moarvm , $ hll-moar , $ QRegex-moarvm ]));
173
+
174
+ my $ nqp-bootstrapped := " nqp-bootstrapped.js" ;
175
+
176
+ say (" nqp-bootstrapped.js: $ QAST-moarvm $ NQPP6QRegex-moarvm $ nqp-combined $ QRegex-moarvm
177
+ ./nqp-js --target=js --output=$ nqp-bootstrapped $ nqp-combined
178
+ " );
172
179
173
180
174
- deps(" js-bootstrap" , $ nqp-combined , $ p6regex-combined , $ hll-combined , $ QAST-moarvm , $ NQPP6QRegex-moarvm );
181
+ deps(" js-bootstrap" , " js-all " , $ nqp-bootstrapped );
175
182
0 commit comments