Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 158 lines (137 sloc) 5.917 kb
923eae5 Stefan O'Rear 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 Stefan O'Rear Revert use of collectable assemblies for eval
authored
5 CSC=gmcs
923eae5 Stefan O'Rear Redo build system; bootstrapped niecza is live
authored
6 RM=rm -f
7 CP=cp
8
ef344df Stefan O'Rear Split basic object stuff into ObjModel.cs
authored
9 cskernel=Kernel.cs Builtins.cs Cursor.cs JSYNC.cs NieczaCLR.cs Utils.cs \
50d44e4 Stefan O'Rear Add new types Int, Rat, FatRat, Complex
authored
10 ObjModel.cs BigInteger.cs
923eae5 Stefan O'Rear Redo build system; bootstrapped niecza is live
authored
11 csbackend=CLRBackend.cs
b94a627 Stefan O'Rear Revise downcall protocol (ki9a++) and use downcalls to invoke CLRBackend
authored
12 csxdr=CrossDomainReceiver.cs
923eae5 Stefan O'Rear Redo build system; bootstrapped niecza is live
authored
13
c58db17 Martin Berends [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 Stefan O'Rear Update bootstrap to one built against the 2.0 runtime
authored
18 libunits=CORE JSYNC
a94e021 Stefan O'Rear Remove all lexical handling from grammar.
authored
19 srcunits=CClass CgOp Op OpHelpers Sig RxOp STD NieczaGrammar Metamodel \
20 OptRxSimple NAMOutput Operator NieczaActions NieczaFrontendSTD \
21 NieczaPassSimplifier OptBeta NieczaPathSearch NieczaBackendNAM \
22 NieczaBackendDotnet NieczaBackendClisp NieczaBackendHoopl \
23 NieczaCompiler GetOptLong
923eae5 Stefan O'Rear Redo build system; bootstrapped niecza is live
authored
24
1b13b31 Stefan O'Rear 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 Martin Berends [Makefile] add targets aot spectest clean realclean and help
mberends authored
26 @git describe --tags > VERSION
eab7f8a Stefan O'Rear Add test and p6eval make targets
authored
27
ac88a90 Stefan O'Rear 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 Stefan O'Rear 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 Stefan O'Rear Auto-compile setting on make to end p6eval timeouts
authored
33 $(RUN_CLR) run/Niecza.exe -C CORE
34
ac88a90 Stefan O'Rear 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 Stefan O'Rear Redo build system; bootstrapped niecza is live
authored
37 $(RUN_CLR) boot/obj/CLRBackend.exe boot/obj MAIN.nam MAIN.exe 1
b94a627 Stefan O'Rear Revise downcall protocol (ki9a++) and use downcalls to invoke CLRBackend
authored
38 $(CP) $(patsubst %,boot/obj/%.dll,Kernel CrossDomainReceiver $(libunits) $(srcunits)) run/
923eae5 Stefan O'Rear 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
24e0bb1 Stefan O'Rear Do not use bootstrap compiler in multi-compile mode
authored
46 $(RUN_CLR) boot/run/Niecza.exe -C CORE
47 $(RUN_CLR) boot/run/Niecza.exe -C JSYNC
923eae5 Stefan O'Rear Redo build system; bootstrapped niecza is live
authored
48 touch .fetch-stamp
49
b94a627 Stefan O'Rear Revise downcall protocol (ki9a++) and use downcalls to invoke CLRBackend
authored
50 obj/CrossDomainReceiver.dll: $(patsubst %,lib/%,$(csxdr))
51 $(CSC) /target:library /out:obj/CrossDomainReceiver.dll \
52 $(patsubst %,lib/%,$(csxdr))
53 obj/Kernel.dll: $(patsubst %,lib/%,$(cskernel)) obj/CrossDomainReceiver.dll
54 $(CSC) /target:library /out:obj/Kernel.dll /r:CrossDomainReceiver.dll \
55 /lib:obj /unsafe+ $(patsubst %,lib/%,$(cskernel))
56 obj/CLRBackend.exe: $(patsubst %,lib/%,$(csbackend)) obj/Kernel.dll obj/CrossDomainReceiver.dll
923eae5 Stefan O'Rear Redo build system; bootstrapped niecza is live
authored
57 $(CSC) /target:exe /lib:obj /out:obj/CLRBackend.exe /r:Kernel.dll \
b94a627 Stefan O'Rear Revise downcall protocol (ki9a++) and use downcalls to invoke CLRBackend
authored
58 /r:CrossDomainReceiver.dll $(patsubst %,lib/%,$(csbackend))
eab7f8a Stefan O'Rear Add test and p6eval make targets
authored
59
8851938 Martin Berends [now] refactor the underlying function names and tweak 'make aot'
mberends authored
60 aot: all
c58db17 Martin Berends [Makefile] add targets aot spectest clean realclean and help
mberends authored
61 mono --aot run/*.dll run/Niecza.exe
62
eab7f8a Stefan O'Rear Add test and p6eval make targets
authored
63 test: all
64 $(RUN_CLR) run/Niecza.exe -c test.pl
762eae4 Stefan O'Rear Note 2.6 breakage in README
authored
65 prove -e "$(RUN_CLR)" obj/MAIN.exe
eab7f8a Stefan O'Rear Add test and p6eval make targets
authored
66
c58db17 Martin Berends [Makefile] add targets aot spectest clean realclean and help
mberends authored
67 spectest: all
68 @t/run_spectests
69
eab7f8a Stefan O'Rear Add test and p6eval make targets
authored
70 p6eval: all
71 $(RUN_CLR) run/Niecza.exe -C CORE Test JSYNC
c58db17 Martin Berends [Makefile] add targets aot spectest clean realclean and help
mberends authored
72
73 clean:
185c435 Stefan O'Rear Add a Makefile rule to build and test release tarballs
authored
74 @rm -f obj/*.dll obj/*.exe obj/*.nam
75 @rm -f run/Niecza.exe
76 @rm -f run/*.dll
77 @rm -f run/*.dll.so
78 @rm -fr *~
79
3fd815c Stefan O'Rear Partial revert of low-ranking optimization that broke build
authored
80 half_reboot: all
185c435 Stefan O'Rear Add a Makefile rule to build and test release tarballs
authored
81 # setup a clean build area
82 rm -rf stage2/ stage3/
4d3df1b Stefan O'Rear Finish fixing up make reboot
authored
83 mkdir -p stage2/obj stage2/run stage2/boot stage2/boot/obj \
84 stage3/obj stage3/run stage3/boot stage3/boot/obj
185c435 Stefan O'Rear Add a Makefile rule to build and test release tarballs
authored
85 touch stage2/FETCH_URL stage3/FETCH_URL stage2/.fetch-stamp \
86 stage3/.fetch-stamp
4d3df1b Stefan O'Rear Finish fixing up make reboot
authored
87 cp -a src/ lib/ Makefile stage2/
88 cp -a src/ lib/ Makefile stage3/
185c435 Stefan O'Rear Add a Makefile rule to build and test release tarballs
authored
89 # build a current Niecza with current Niecza
90 cp obj/Kernel.dll obj/CrossDomainReceiver.dll obj/CLRBackend.exe \
91 stage2/boot/obj
92 cp -a lib run stage2/boot
93 cd stage2 && $(RUN_CLR) boot/run/Niecza.exe -C CORE JSYNC
3fd815c Stefan O'Rear Partial revert of low-ranking optimization that broke build
authored
94 cp test.pl stage2/
95 cd stage2 && $(MAKE) test
96
97 reboot: half_reboot
185c435 Stefan O'Rear Add a Makefile rule to build and test release tarballs
authored
98 # verify that the new Niecza can build itself correctly
99 cp stage2/obj/Kernel.dll stage2/obj/CrossDomainReceiver.dll \
100 stage2/obj/CLRBackend.exe stage3/boot/obj
101 cp -a lib stage2/run stage3/boot
102 cd stage3 && $(RUN_CLR) boot/run/Niecza.exe -C CORE JSYNC
4d3df1b Stefan O'Rear Finish fixing up make reboot
authored
103 cp test.pl stage3/
185c435 Stefan O'Rear Add a Makefile rule to build and test release tarballs
authored
104 cd stage3 && $(MAKE) test
105 # yay, stage2/ looks like a good new bootstrap version
4d3df1b Stefan O'Rear Finish fixing up make reboot
authored
106 # clean up the stuff that should NOT go into the boot
f6cf9b5 Stefan O'Rear Leave confusing files out of binary
authored
107 cd stage2 && rm -rf lib/*.cs obj/* src boot VERSION FETCH_URL \
108 Makefile test.pl
185c435 Stefan O'Rear Add a Makefile rule to build and test release tarballs
authored
109 cp obj/CrossDomainReceiver.dll obj/Kernel.dll obj/CLRBackend.exe \
110 stage2/obj
111 cp -a LICENSE README.pod docs/ stage2/
112 cd stage2 && zip -9r ../NewNieczaBootstrap.zip *
c58db17 Martin Berends [Makefile] add targets aot spectest clean realclean and help
mberends authored
113
114 realclean: clean
115 @rm .fetch-stamp
116
117 help:
118 @echo ''
119 @echo 'You can make the following targets in this Niecza Makefile:'
120 @echo ''
121 @echo 'all the main Niecza compiler and runtime files (default)'
122 @echo 'aot Ahead of Time compile run/Niecza.exe and run/*.dll (increases speed)'
123 @echo 'test run/Niecza.exe test.pl'
124 @echo 'spectest t/run_spectests'
125 @echo 'clean remove all generated files'
126 @echo 'realclean clean and also require new download of bootstrap files'
127 @echo 'help this list of targets'
128 @echo ''
129
612a7b7 Stefan O'Rear Eliminate Beta as a separate pass, inline subs during the parse
authored
130 # grep -r '^use' src/*.pm6 | sed 's|src/\(.*\)\.pm6:use \(.*\);|boot/obj/\1.nam: boot/obj/\2.nam|' | grep -v MONKEY_TYPING
ac88a90 Stefan O'Rear Use Makefile to control building of compiler modules
authored
131 boot/obj/NAMOutput.nam: boot/obj/JSYNC.nam
132 boot/obj/NAMOutput.nam: boot/obj/Metamodel.nam
133 boot/obj/NAMOutput.nam: boot/obj/Sig.nam
134 boot/obj/NieczaActions.nam: boot/obj/Op.nam
135 boot/obj/NieczaActions.nam: boot/obj/RxOp.nam
136 boot/obj/NieczaActions.nam: boot/obj/Sig.nam
137 boot/obj/NieczaActions.nam: boot/obj/CClass.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/NieczaGrammar.nam
148 boot/obj/NieczaFrontendSTD.nam: boot/obj/NieczaActions.nam
149 boot/obj/NieczaGrammar.nam: boot/obj/STD.nam
150 boot/obj/Operator.nam: boot/obj/Sig.nam
151 boot/obj/Operator.nam: boot/obj/OpHelpers.nam
152 boot/obj/Op.nam: boot/obj/CgOp.nam
612a7b7 Stefan O'Rear Eliminate Beta as a separate pass, inline subs during the parse
authored
153 boot/obj/OptBeta.nam: boot/obj/CgOp.nam
ac88a90 Stefan O'Rear Use Makefile to control building of compiler modules
authored
154 boot/obj/OptRxSimple.nam: boot/obj/RxOp.nam
155 boot/obj/RxOp.nam: boot/obj/CgOp.nam
156 boot/obj/RxOp.nam: boot/obj/CClass.nam
157 boot/obj/Sig.nam: boot/obj/CgOp.nam
Something went wrong with that request. Please try again.