Skip to content

Commit a1267ed

Browse files
committed
[build] untagle build targets
you can now write "perl Configure.pl --backends=parrot,jvm" and then "make p-all" and "make j-all", and it will build both nqp-parrot and nqp-jvm (though the launchers might still be confused)
1 parent dbbd3ac commit a1267ed

File tree

3 files changed

+51
-51
lines changed

3 files changed

+51
-51
lines changed

tools/build/Makefile-JVM.in

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ JAVA = java
22
JAVAC = javac
33
JAR = jar
44
ASM = 3rdparty/asm/
5-
RUNNER = @runner@
5+
J_RUNNER = @runner@
66

77
NQP_JAR_DIR = $(NQP_LANG_DIR)/runtime
88
JVM_BUILD_DIR = gen/jvm
@@ -73,9 +73,9 @@ ALL_OUTPUT = $(NQP_MO_JAR) $(MODULE_LOADER_JAR) \
7373
$(JASTNODES_JAR) $(QAST_JAR) \
7474
$(P6QREGEX_JAR) $(NQP_JAR) \
7575

76-
all: $(ALL_OUTPUT) $(RUNNER) $(P5QREGEX_JAR)
76+
j-all: $(ALL_OUTPUT) $(J_RUNNER) $(P5QREGEX_JAR)
7777

78-
install: all
78+
j-install: j-all
7979
$(MKPATH) $(BIN_DIR)
8080
$(MKPATH) $(NQP_JAR_DIR)
8181
$(MKPATH) $(NQP_LIB_DIR)
@@ -259,14 +259,14 @@ $(ALL_OUTPUT): $(J_STAGE2_OUTPUT)
259259
$(CP) $(J_STAGE2)/$(P6QREGEX_JAR) .
260260
$(CP) $(J_STAGE2)/$(NQP_JAR) .
261261

262-
$(RUNNER): src/vm/jvm/runners/$(RUNNER)
263-
$(CP) src/vm/jvm/runners/$(RUNNER) .
264-
$(CHMOD) 755 $(RUNNER)
262+
$(J_RUNNER): src/vm/jvm/runners/$(J_RUNNER)
263+
$(CP) src/vm/jvm/runners/$(J_RUNNER) .
264+
$(CHMOD) 755 $(J_RUNNER)
265265

266266
$(P5QREGEX_JAR): $(ALL_OUTPUT) $(P5QREGEX_SOURCES)
267267
$(MKPATH) $(J_STAGE2)
268268
$(PERL) tools/build/gen-cat.pl jvm $(P5QREGEX_SOURCES) > $(J_STAGE2)/$(P5QREGEX_COMBINED)
269-
.@slash@$(RUNNER) --target=jar --output=$(P5QREGEX_JAR) \
269+
.@slash@$(J_RUNNER) --target=jar --output=$(P5QREGEX_JAR) \
270270
$(J_STAGE2)/$(P5QREGEX_COMBINED)
271271

272272
bootstrap-files: $(J_STAGE2_OUTPUT)
@@ -283,23 +283,23 @@ bootstrap-files: $(J_STAGE2_OUTPUT)
283283

284284
## testing
285285

286-
t/*/*.t: all
287-
prove -r -v --exec .@slash@$(RUNNER) $@
286+
t/*/*.t: j-all
287+
prove -r -v --exec .@slash@$(J_RUNNER) $@
288288

289-
test: all
290-
prove -r --exec .@slash@$(RUNNER) t/nqp t/qregex t/p5regex t/qast t/serialization t/jvm t/nativecall
289+
j-test: j-all
290+
prove -r --exec .@slash@$(J_RUNNER) t/nqp t/qregex t/p5regex t/qast t/serialization t/jvm t/nativecall
291291

292-
test-loud: all
293-
prove -r -v --exec .@slash@$(RUNNER) t/nqp t/qregex t/p5regex t/qast t/serialization t/jvm t/nativecall
292+
j-test-loud: j-all
293+
prove -r -v --exec .@slash@$(J_RUNNER) t/nqp t/qregex t/p5regex t/qast t/serialization t/jvm t/nativecall
294294

295-
core-test: $(RUNNER)
296-
prove -r --exec .@slash@$(RUNNER) t/nqp
295+
j-core-test: $(J_RUNNER)
296+
prove -r --exec .@slash@$(J_RUNNER) t/nqp
297297

298-
core-test-loud: $(RUNNER)
299-
prove -r -v --exec .@slash@$(RUNNER) t/nqp
298+
j-core-test-loud: $(J_RUNNER)
299+
prove -r -v --exec .@slash@$(J_RUNNER) t/nqp
300300

301-
qregex-test: $(RUNNER)
302-
prove -r --exec .@slash@$(RUNNER) t/qregex
301+
j-qregex-test: $(J_RUNNER)
302+
prove -r --exec .@slash@$(J_RUNNER) t/qregex
303303

304-
qregex-test-loud: $(RUNNER)
305-
prove -r -v --exec .@slash@$(RUNNER) t/qregex
304+
j-qregex-test-loud: $(J_RUNNER)
305+
prove -r -v --exec .@slash@$(J_RUNNER) t/qregex

tools/build/Makefile-Moar.in

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MOAR = $(BIN_DIR)/moar
2-
RUNNER = @runner@
2+
M_RUNNER = @runner@
33

44
M_STAGE0 = src/vm/moar/stage0
55
M_STAGE1 = gen/moar/stage1
@@ -51,9 +51,9 @@ M_STAGE2_OUTPUT = $(M_STAGE2)/$(NQP_MO_MOAR) $(M_STAGE2)/$(MODULE_LOADER_MOAR) \
5151
$(M_STAGE2)/$(QAST_MOAR) $(M_STAGE2)/$(P6QREGEX_MOAR) \
5252
$(M_STAGE2)/$(NQP_MOAR)
5353

54-
all: $(NQP_MOAR) $(RUNNER) $(P5QREGEX_MOAR)
54+
m-all: $(NQP_MOAR) $(M_RUNNER) $(P5QREGEX_MOAR)
5555

56-
install: all
56+
m-install: m-all
5757
$(MKPATH) $(BIN_DIR)
5858
$(MKPATH) $(NQP_LIB_DIR)
5959
$(CP) $(NQP_MO_MOAR) $(NQP_LIB_DIR)
@@ -228,37 +228,37 @@ $(NQP_MOAR): $(M_STAGE2_OUTPUT)
228228
$(CP) $(M_STAGE2)/$(P6QREGEX_MOAR) .
229229
$(CP) $(M_STAGE2)/$(NQP_MOAR) .
230230

231-
$(RUNNER): tools/build/gen-moar-runner.pl
231+
$(M_RUNNER): tools/build/gen-moar-runner.pl
232232
$(PERL) tools/build/gen-moar-runner.pl "$(MOAR)"
233233

234-
$(P5QREGEX_MOAR): $(P5QREGEX_SOURCES) $(NQP_MOAR) $(RUNNER)
234+
$(P5QREGEX_MOAR): $(P5QREGEX_SOURCES) $(NQP_MOAR) $(M_RUNNER)
235235
$(MKPATH) $(M_STAGE2)/gen
236236
$(PERL) tools/build/gen-cat.pl moar $(P5QREGEX_SOURCES) > $(M_STAGE2)/$(P5QREGEX_COMBINED)
237-
.@slash@$(RUNNER) --target=mbc --output=$(P5QREGEX_MOAR) \
237+
.@slash@$(M_RUNNER) --target=mbc --output=$(P5QREGEX_MOAR) \
238238
$(M_STAGE2)/$(P5QREGEX_COMBINED)
239239

240240
## testing
241241

242-
t/*/*.t: all
243-
prove -r -v --exec ".@slash@$(RUNNER)" $@
242+
t/*/*.t: m-all
243+
prove -r -v --exec ".@slash@$(M_RUNNER)" $@
244244

245-
test: all
246-
prove -r --exec ".@slash@$(RUNNER)" t/nqp t/qregex t/p5regex t/qast t/serialization
245+
m-test: m-all
246+
prove -r --exec ".@slash@$(M_RUNNER)" t/nqp t/qregex t/p5regex t/qast t/serialization
247247

248-
test-loud: all
249-
prove -r -v --exec ".@slash@$(RUNNER)" t/nqp t/qregex t/p5regex t/qast t/serialization
248+
m-test-loud: m-all
249+
prove -r -v --exec ".@slash@$(M_RUNNER)" t/nqp t/qregex t/p5regex t/qast t/serialization
250250

251-
core-test: $(RUNNER)
252-
prove -r --exec ".@slash@$(RUNNER)" t/nqp
251+
m-core-test: $(M_RUNNER)
252+
prove -r --exec ".@slash@$(M_RUNNER)" t/nqp
253253

254-
core-test-loud: $(RUNNER)
255-
prove -r -v --exec ".@slash@$(RUNNER)" t/nqp
254+
m-core-test-loud: $(M_RUNNER)
255+
prove -r -v --exec ".@slash@$(M_RUNNER)" t/nqp
256256

257-
qregex-test: $(RUNNER)
258-
prove -r --exec ".@slash@$(RUNNER)" t/qregex
257+
m-qregex-test: $(M_RUNNER)
258+
prove -r --exec ".@slash@$(M_RUNNER)" t/qregex
259259

260-
qregex-test-loud: $(RUNNER)
261-
prove -r -v --exec ".@slash@$(RUNNER)" t/qregex
260+
m-qregex-test-loud: $(M_RUNNER)
261+
prove -r -v --exec ".@slash@$(M_RUNNER)" t/qregex
262262

263263
# nqp::makefile <-- tells NQP::Configure to treat this file as a makefile,
264264
# performing win32 slash and makefile conversions

tools/build/Makefile-Parrot.in

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -474,11 +474,11 @@ CLEANUPS = \
474474
src/vm/parrot/6model/reprs/*$(O) \
475475
src/vm/parrot/6model/reprs/*.pdb \
476476

477-
all: $(PARROT_BUILD_DIR)/$(NQP_EXE) $(P5QREGEX_PBC) $(NQP_LAUNCHER)$(BAT)
477+
p-all: $(PARROT_BUILD_DIR)/$(NQP_EXE) $(P5QREGEX_PBC) $(NQP_LAUNCHER)$(BAT)
478478

479-
install: base-install exec-install
479+
p-install: p-base-install p-exec-install
480480

481-
base-install: all
481+
p-base-install: p-all
482482
$(MKPATH) $(DESTDIR)$(PARROT_LIBRARY_DIR)
483483
$(MKPATH) $(DESTDIR)$(PARROT_LIB_DIR)/include
484484
$(CP) $(PARROT_BUILD_DIR)/$(MODULE_LOADER_PBC) $(DESTDIR)$(PARROT_LIBRARY_DIR)/$(MODULE_LOADER_PBC)
@@ -501,7 +501,7 @@ base-install: all
501501
$(MKPATH) $(DESTDIR)$(PARROT_INCLUDE_DIR)/dynpmc
502502
$(CP) $(DYNPMC_HEADERS) $(DESTDIR)$(PARROT_INCLUDE_DIR)/dynpmc
503503

504-
exec-install:
504+
p-exec-install:
505505
$(CP) $(PARROT_BUILD_DIR)/$(NQP_EXE) $(DESTDIR)$(PARROT_BIN_DIR)/nqp$(EXE)
506506
$(CHMOD) 755 $(DESTDIR)$(PARROT_BIN_DIR)/nqp$(EXE)
507507

@@ -1031,22 +1031,22 @@ bootstrap-files: $(STAGE2_PBCS) $(P_STAGE2)/$(CORE_SETTING_NQP)
10311031

10321032
## testing
10331033

1034-
t/*/*.t: all
1034+
t/*/*.t: p-all
10351035
prove -r -v --exec $(PARROT_BUILD_DIR)/$(NQP_EXE) $@
10361036

1037-
test: all
1037+
p-test: p-all
10381038
prove -r --exec "$(NQP_LAUNCHER) --vmlibs=nqp_dyncall_ops" t/nqp t/parrot t/hll t/qregex t/p5regex t/qast t/serialization t/nativecall
10391039

1040-
test-loud: all
1040+
p-test-loud: p-all
10411041
prove -r -v --exec "$(NQP_LAUNCHER) --vmlibs=nqp_dyncall_ops" t/nqp t/parrot t/hll t/qregex t/p5regex t/qast t/serialization t/nativecall
10421042

1043-
core-test: $(NQP_LAUNCHER)$(BAT)
1043+
p-core-test: $(NQP_LAUNCHER)$(BAT)
10441044
prove -r --exec $(PARROT_BUILD_DIR)/$(NQP_EXE) t/nqp t/parrot
10451045

1046-
core-test-loud: $(NQP_LAUNCHER)$(BAT)
1046+
p-core-test-loud: $(NQP_LAUNCHER)$(BAT)
10471047
prove -r -v --exec $(NQP_LAUNCHER) t/nqp t/parrot
10481048

1049-
qregex-test: $(NQP_LAUNCHER)$(BAT)
1049+
p-qregex-test: $(NQP_LAUNCHER)$(BAT)
10501050
prove -r --exec $(NQP_LAUNCHER) t/qregex
10511051

10521052
qregex-test-loud: $(NQP_LAUNCHER)$(BAT)

0 commit comments

Comments
 (0)