This repository has been archived by the owner on Dec 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
120 lines (85 loc) · 3.74 KB
/
Makefile
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
NQP = nqp
PARROT = parrot
JAVAC = javac
JAR = jar
PERL = perl
PROVE = prove
NQPLIBS = NQPCOREJVM.setting.class nqp-mo.class ModuleLoader.class QASTNodeJVM.class \
QRegexJVM.class NQPHLLJVM.class JASTNodesJVM.class QASTJVM.class \
NQPP6QRegexJVM.class NQPJVM.class
NQPLIBPIRS = NQPCOREJVM.setting.pir nqp-mo.pir QASTNodeJVM.pir QRegexJVM.pir NQPHLLJVM.pir \
JASTNodesJVM.pir QASTJVM.pir NQPP6QRegexJVM.pir NQPJVM.pir
CROSSPBCS = JASTNodes.pbc QASTJASTCompiler.pbc helper.pbc
JAVAS = src/org/perl6/nqp/jast2bc/*.java \
src/org/perl6/nqp/runtime/*.java \
src/org/perl6/nqp/sixmodel/*.java \
src/org/perl6/nqp/sixmodel/reprs/*.java
COMPILE = $(NQP) --target=pir --output=$@
PRECOMPILE = $(NQP) --target=pir --no-regex-lib --stable-sc --setting=NQPCOREJVM --output=$@
CROSSCOMPILE = $(NQP) nqp-jvm-cc.nqp --no-regex-lib --target=classfile --output=$@
PRECOMPILE_NS = $(NQP) --target=pir --setting=NULL --stable-sc --output=$@
CROSSCOMPILE_NS = $(NQP) nqp-jvm-cc.nqp --setting=NULL --target=classfile --output=$@
.SUFFIXES: .pir .pbc
all: $(NQPLIBS)
bin: $(JAVAS)
$(PERL) -MExtUtils::Command -e mkpath bin
$(JAVAC) -source 1.7 -cp 3rdparty/asm/asm-debug-all-4.1.jar -g -d bin $(JAVAS)
$(JAR) cf0 nqp-runtime.jar -C bin/ .
test: all
$(PROVE) --exec=$(NQP) t/jast/*.t t/qast/*.t
nqptest: all
$(PROVE) --exec="$(NQP) nqp-jvm-cc.nqp" t/nqp/*.t
selftest: all
$(PROVE) --exec="java -cp .;nqp-runtime.jar;3rdparty/asm/asm-4.1.jar NQPJVM" t/nqp/*.t t/serialization/*.t
clean:
$(PERL) -MExtUtils::Command -e rm_rf bin *.pir *.pbc *.class *.dump
$(NQPLIBS): bin nqp-jvm-cc.nqp $(CROSSPBCS)
$(NQPLIBPIRS): $(CROSSPBCS)
.pir.pbc:
$(PARROT) -o $@ $*.pir
nqp-src/QASTJVM.nqp: lib/QAST/JASTCompiler.nqp
nqp build/usefiddle.nqp
JASTNodes.pir: lib/JAST/Nodes.nqp
$(COMPILE) lib/JAST/Nodes.nqp
QASTJASTCompiler.pir: lib/QAST/JASTCompiler.nqp JASTNodes.pbc
$(COMPILE) lib/QAST/JASTCompiler.nqp
helper.pir: t/helper.nqp QASTJASTCompiler.pbc
$(COMPILE) t/helper.nqp
nqp-mo.pir: nqp-src/nqp-mo.pm
$(PRECOMPILE_NS) nqp-src/nqp-mo.pm
NQPCOREJVM.setting.pir: nqp-src/NQPCORE.setting nqp-mo.pbc
$(PRECOMPILE_NS) nqp-src/NQPCORE.setting
QASTNodeJVM.pir: nqp-src/QASTNodes.nqp NQPCOREJVM.setting.pbc
$(PRECOMPILE) nqp-src/QASTNodes.nqp
QRegexJVM.pir: nqp-src/QRegex.nqp QASTNodeJVM.pbc
$(PRECOMPILE) nqp-src/QRegex.nqp
NQPHLLJVM.pir: nqp-src/NQPHLL.pm QRegexJVM.pbc
$(PRECOMPILE) nqp-src/NQPHLL.pm
JASTNodesJVM.pir: nqp-src/NQPHLL.pm NQPHLLJVM.pbc
$(PRECOMPILE) lib/JAST/Nodes.nqp
QASTJVM.pir: nqp-src/QASTJVM.nqp JASTNodesJVM.pbc
$(PRECOMPILE) nqp-src/QASTJVM.nqp
NQPP6QRegexJVM.pir: nqp-src/NQPP6QRegex.pm QASTJVM.pbc
$(PRECOMPILE) nqp-src/NQPP6QRegex.pm
NQPJVM.pir: nqp-src/NQP.pm NQPP6QRegexJVM.pbc
$(PRECOMPILE) nqp-src/NQP.pm
nqp-mo.class: nqp-src/nqp-mo.pm nqp-mo.pbc
$(CROSSCOMPILE_NS) nqp-src/nqp-mo.pm
ModuleLoader.class: nqp-src/ModuleLoader.pm
$(CROSSCOMPILE_NS) nqp-src/ModuleLoader.pm
NQPCOREJVM.setting.class: nqp-src/NQPCORE.setting NQPCOREJVM.setting.pbc
$(CROSSCOMPILE_NS) nqp-src/NQPCORE.setting
QASTNodeJVM.class: nqp-src/QASTNodes.nqp QASTNodeJVM.pbc
$(CROSSCOMPILE) nqp-src/QASTNodes.nqp
QRegexJVM.class: nqp-src/QRegex.nqp QRegexJVM.pbc
$(CROSSCOMPILE) nqp-src/QRegex.nqp
NQPHLLJVM.class: nqp-src/NQPHLL.pm NQPHLLJVM.pbc
$(CROSSCOMPILE) nqp-src/NQPHLL.pm
JASTNodesJVM.class: lib/JAST/Nodes.nqp JASTNodesJVM.pbc
$(CROSSCOMPILE) lib/JAST/Nodes.nqp
QASTJVM.class: nqp-src/QASTJVM.nqp QASTJVM.pbc
$(CROSSCOMPILE) nqp-src/QASTJVM.nqp
NQPP6QRegexJVM.class: nqp-src/NQPP6QRegex.pm NQPP6QRegexJVM.pbc
$(CROSSCOMPILE) nqp-src/NQPP6QRegex.pm
NQPJVM.class: nqp-src/NQP.pm NQPJVM.pbc
$(NQP) nqp-jvm-cc.nqp --no-regex-lib --target=classfile --output=NQPJVM.class --javaclass=NQPJVM nqp-src/NQP.pm