Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 167 lines (147 sloc) 6.457 kb
923eae5 @sorear Redo build system; bootstrapped niecza is live
authored
1 ### CONFIGURATION
2
3 # How to run CLR programs; can be blank for Win32
4 RUN_CLR=mono
11bf899 @sorear Revert use of collectable assemblies for eval
authored
5 CSC=gmcs
923eae5 @sorear Redo build system; bootstrapped niecza is live
authored
6 RM=rm -f
7 CP=cp
8
ef344df @sorear Split basic object stuff into ObjModel.cs
authored
9 cskernel=Kernel.cs Builtins.cs Cursor.cs JSYNC.cs NieczaCLR.cs Utils.cs \
10 ObjModel.cs
923eae5 @sorear Redo build system; bootstrapped niecza is live
authored
11 csbackend=CLRBackend.cs
b94a627 @sorear Revise downcall protocol (ki9a++) and use downcalls to invoke CLRBackend
authored
12 csxdr=CrossDomainReceiver.cs
923eae5 @sorear Redo build system; bootstrapped niecza is live
authored
13
c58db17 @mberends [Makefile] add targets aot spectest clean realclean and help
mberends authored
14 # Tell make to regard the following targets as not being filenames
15 .PHONY: all aot test spectest clean realclean
16 .PHONY: help
17
82bb637 @sorear Update bootstrap to one built against the 2.0 runtime
authored
18 libunits=CORE JSYNC
a06dd3c @sorear Mergeback and factor out OpHelpers/GetOptLong
authored
19 srcunits=CClass Body Unit CgOp Op OpHelpers Sig RxOp NAME Stash STD \
20 NieczaGrammar Metamodel OptRxSimple NAMOutput Operator NieczaActions \
3e85a71 @sorear Operator handling unification (postfix)
authored
21 NieczaFrontendSTD NieczaPassBegin NieczaPassBeta NieczaPassSimplifier \
22 NieczaPathSearch NieczaBackendNAM NieczaBackendDotnet \
d9fcbb6 @pmurias added -Bhoopl
pmurias authored
23 NieczaBackendClisp NieczaBackendHoopl NieczaCompiler GetOptLong
923eae5 @sorear Redo build system; bootstrapped niecza is live
authored
24
1b13b31 @sorear Auto-compile setting on make to end p6eval timeouts
authored
25 all: run/Niecza.exe obj/Kernel.dll obj/CORE.nam obj/CLRBackend.exe
c58db17 @mberends [Makefile] add targets aot spectest clean realclean and help
mberends authored
26 @git describe --tags > VERSION
eab7f8a @sorear Add test and p6eval make targets
authored
27
ac88a90 @sorear Use Makefile to control building of compiler modules
authored
28 $(patsubst %,boot/obj/%.nam,$(srcunits)): boot/obj/%.nam: .fetch-stamp src/%.pm6 boot/obj/CORE.nam
29 cd src && $(RUN_CLR) ../boot/run/Niecza.exe -Bnam -C $*
30 $(RUN_CLR) boot/obj/CLRBackend.exe boot/obj $*.nam $*.dll 0
31
dafccd8 @sorear Kill SAFE/CORE division; use is unsafe to implement safe mode
authored
32 obj/CORE.nam: run/Niecza.exe obj/CLRBackend.exe lib/CORE.setting
1b13b31 @sorear Auto-compile setting on make to end p6eval timeouts
authored
33 $(RUN_CLR) run/Niecza.exe -C CORE
34
ac88a90 @sorear Use Makefile to control building of compiler modules
authored
35 run/Niecza.exe: .fetch-stamp $(patsubst %,boot/obj/%.nam,$(srcunits)) src/niecza
36 cd src && $(RUN_CLR) ../boot/run/Niecza.exe -c -Bnam niecza
923eae5 @sorear Redo build system; bootstrapped niecza is live
authored
37 $(RUN_CLR) boot/obj/CLRBackend.exe boot/obj MAIN.nam MAIN.exe 1
b94a627 @sorear Revise downcall protocol (ki9a++) and use downcalls to invoke CLRBackend
authored
38 $(CP) $(patsubst %,boot/obj/%.dll,Kernel CrossDomainReceiver $(libunits) $(srcunits)) run/
923eae5 @sorear Redo build system; bootstrapped niecza is live
authored
39 $(CP) boot/obj/MAIN.exe run/Niecza.exe
40
41 .fetch-stamp: FETCH_URL
42 -rm -rf boot/
43 mkdir boot
44 wget --no-check-certificate -Oboot/niecza.zip $$(cat FETCH_URL)
45 cd boot && unzip niecza.zip
ac88a90 @sorear Use Makefile to control building of compiler modules
authored
46 $(RUN_CLR) boot/run/Niecza.exe -C CORE JSYNC
923eae5 @sorear Redo build system; bootstrapped niecza is live
authored
47 touch .fetch-stamp
48
b94a627 @sorear Revise downcall protocol (ki9a++) and use downcalls to invoke CLRBackend
authored
49 obj/CrossDomainReceiver.dll: $(patsubst %,lib/%,$(csxdr))
50 $(CSC) /target:library /out:obj/CrossDomainReceiver.dll \
51 $(patsubst %,lib/%,$(csxdr))
52 obj/Kernel.dll: $(patsubst %,lib/%,$(cskernel)) obj/CrossDomainReceiver.dll
53 $(CSC) /target:library /out:obj/Kernel.dll /r:CrossDomainReceiver.dll \
54 /lib:obj /unsafe+ $(patsubst %,lib/%,$(cskernel))
55 obj/CLRBackend.exe: $(patsubst %,lib/%,$(csbackend)) obj/Kernel.dll obj/CrossDomainReceiver.dll
923eae5 @sorear Redo build system; bootstrapped niecza is live
authored
56 $(CSC) /target:exe /lib:obj /out:obj/CLRBackend.exe /r:Kernel.dll \
b94a627 @sorear Revise downcall protocol (ki9a++) and use downcalls to invoke CLRBackend
authored
57 /r:CrossDomainReceiver.dll $(patsubst %,lib/%,$(csbackend))
eab7f8a @sorear Add test and p6eval make targets
authored
58
8851938 @mberends [now] refactor the underlying function names and tweak 'make aot'
mberends authored
59 aot: all
c58db17 @mberends [Makefile] add targets aot spectest clean realclean and help
mberends authored
60 mono --aot run/*.dll run/Niecza.exe
61
eab7f8a @sorear Add test and p6eval make targets
authored
62 test: all
63 $(RUN_CLR) run/Niecza.exe -c test.pl
762eae4 @sorear Note 2.6 breakage in README
authored
64 prove -e "$(RUN_CLR)" obj/MAIN.exe
eab7f8a @sorear Add test and p6eval make targets
authored
65
c58db17 @mberends [Makefile] add targets aot spectest clean realclean and help
mberends authored
66 spectest: all
67 @t/run_spectests
68
eab7f8a @sorear Add test and p6eval make targets
authored
69 p6eval: all
70 $(RUN_CLR) run/Niecza.exe -C CORE Test JSYNC
c58db17 @mberends [Makefile] add targets aot spectest clean realclean and help
mberends authored
71
72 clean:
185c435 @sorear Add a Makefile rule to build and test release tarballs
authored
73 @rm -f obj/*.dll obj/*.exe obj/*.nam
74 @rm -f run/Niecza.exe
75 @rm -f run/*.dll
76 @rm -f run/*.dll.so
77 @rm -fr *~
78
79 reboot: all
80 # setup a clean build area
81 rm -rf stage2/ stage3/
4d3df1b @sorear Finish fixing up make reboot
authored
82 mkdir -p stage2/obj stage2/run stage2/boot stage2/boot/obj \
83 stage3/obj stage3/run stage3/boot stage3/boot/obj
185c435 @sorear Add a Makefile rule to build and test release tarballs
authored
84 touch stage2/FETCH_URL stage3/FETCH_URL stage2/.fetch-stamp \
85 stage3/.fetch-stamp
4d3df1b @sorear Finish fixing up make reboot
authored
86 cp -a src/ lib/ Makefile stage2/
87 cp -a src/ lib/ Makefile stage3/
185c435 @sorear Add a Makefile rule to build and test release tarballs
authored
88 # build a current Niecza with current Niecza
89 cp obj/Kernel.dll obj/CrossDomainReceiver.dll obj/CLRBackend.exe \
90 stage2/boot/obj
91 cp -a lib run stage2/boot
92 cd stage2 && $(RUN_CLR) boot/run/Niecza.exe -C CORE JSYNC
93 cd stage2 && $(MAKE)
94 # verify that the new Niecza can build itself correctly
95 cp stage2/obj/Kernel.dll stage2/obj/CrossDomainReceiver.dll \
96 stage2/obj/CLRBackend.exe stage3/boot/obj
97 cp -a lib stage2/run stage3/boot
98 cd stage3 && $(RUN_CLR) boot/run/Niecza.exe -C CORE JSYNC
4d3df1b @sorear Finish fixing up make reboot
authored
99 cp test.pl stage3/
185c435 @sorear Add a Makefile rule to build and test release tarballs
authored
100 cd stage3 && $(MAKE) test
101 # yay, stage2/ looks like a good new bootstrap version
4d3df1b @sorear Finish fixing up make reboot
authored
102 # clean up the stuff that should NOT go into the boot
103 cd stage2 && rm -rf lib/*.cs obj/* src boot VERSION FETCH_URL
185c435 @sorear Add a Makefile rule to build and test release tarballs
authored
104 cp obj/CrossDomainReceiver.dll obj/Kernel.dll obj/CLRBackend.exe \
105 stage2/obj
106 cp -a LICENSE README.pod docs/ stage2/
107 cd stage2 && zip -9r ../NewNieczaBootstrap.zip *
c58db17 @mberends [Makefile] add targets aot spectest clean realclean and help
mberends authored
108
109 realclean: clean
110 @rm .fetch-stamp
111
112 help:
113 @echo ''
114 @echo 'You can make the following targets in this Niecza Makefile:'
115 @echo ''
116 @echo 'all the main Niecza compiler and runtime files (default)'
117 @echo 'aot Ahead of Time compile run/Niecza.exe and run/*.dll (increases speed)'
118 @echo 'test run/Niecza.exe test.pl'
119 @echo 'spectest t/run_spectests'
120 @echo 'clean remove all generated files'
121 @echo 'realclean clean and also require new download of bootstrap files'
122 @echo 'help this list of targets'
123 @echo ''
124
ac88a90 @sorear Use Makefile to control building of compiler modules
authored
125 # grep -r '^use' src/*.pm6 | sed 's|src/\(.*\)\.pm6:use \(.*\);|boot/obj/\1.nam: boot/obj/\2.nam|'
126 boot/obj/Metamodel.nam: boot/obj/NAME.nam
127 boot/obj/Metamodel.nam: boot/obj/Stash.nam
128 boot/obj/NAMOutput.nam: boot/obj/JSYNC.nam
129 boot/obj/NAMOutput.nam: boot/obj/Metamodel.nam
130 boot/obj/NAMOutput.nam: boot/obj/Sig.nam
131 boot/obj/NieczaActions.nam: boot/obj/Op.nam
132 boot/obj/NieczaActions.nam: boot/obj/RxOp.nam
133 boot/obj/NieczaActions.nam: boot/obj/Body.nam
134 boot/obj/NieczaActions.nam: boot/obj/Unit.nam
135 boot/obj/NieczaActions.nam: boot/obj/Sig.nam
136 boot/obj/NieczaActions.nam: boot/obj/CClass.nam
137 boot/obj/NieczaActions.nam: boot/obj/OptRxSimple.nam
138 boot/obj/NieczaActions.nam: boot/obj/OpHelpers.nam
139 boot/obj/NieczaActions.nam: boot/obj/Operator.nam
140 boot/obj/NieczaBackendClisp.nam: boot/obj/NieczaBackendNAM.nam
141 boot/obj/NieczaBackendDotnet.nam: boot/obj/NieczaBackendNAM.nam
142 boot/obj/NieczaBackendDotnet.nam: boot/obj/NAMOutput.nam
143 boot/obj/NieczaBackendHoopl.nam: boot/obj/NieczaBackendNAM.nam
144 boot/obj/NieczaBackendNAM.nam: boot/obj/NAMOutput.nam
145 boot/obj/NieczaCompiler.nam: boot/obj/JSYNC.nam
146 boot/obj/NieczaFrontendSTD.nam: boot/obj/STD.nam
147 boot/obj/NieczaFrontendSTD.nam: boot/obj/Stash.nam
148 boot/obj/NieczaFrontendSTD.nam: boot/obj/NieczaGrammar.nam
149 boot/obj/NieczaFrontendSTD.nam: boot/obj/NieczaActions.nam
150 boot/obj/NieczaGrammar.nam: boot/obj/STD.nam
151 boot/obj/NieczaPassBegin.nam: boot/obj/Unit.nam
152 boot/obj/NieczaPassBegin.nam: boot/obj/Sig.nam
153 boot/obj/NieczaPassBegin.nam: boot/obj/Body.nam
154 boot/obj/NieczaPassBegin.nam: boot/obj/Op.nam
155 boot/obj/NieczaPassBegin.nam: boot/obj/Metamodel.nam
156 boot/obj/NieczaPassBeta.nam: boot/obj/CgOp.nam
157 boot/obj/Operator.nam: boot/obj/Body.nam
158 boot/obj/Operator.nam: boot/obj/Sig.nam
159 boot/obj/Operator.nam: boot/obj/OpHelpers.nam
160 boot/obj/Op.nam: boot/obj/CgOp.nam
161 boot/obj/OptRxSimple.nam: boot/obj/RxOp.nam
162 boot/obj/RxOp.nam: boot/obj/CgOp.nam
163 boot/obj/RxOp.nam: boot/obj/CClass.nam
164 boot/obj/Sig.nam: boot/obj/CgOp.nam
165 boot/obj/STD.nam: boot/obj/NAME.nam
166 boot/obj/STD.nam: boot/obj/Stash.nam
Something went wrong with that request. Please try again.