Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 169 lines (144 sloc) 6.274 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
7451754 @sorear Finish implementation of -gen-app function
authored
5 CSC=gmcs /debug+
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 \
94e9968 @sorear Merge remote branch 'origin/master' into serialize
authored
10 ObjModel.cs BigInteger.cs Printf.cs CodeGen.cs \
b25256f @sorear Add Serialize.cs to build, fix build errors
authored
11 GeneratedTrigFunctions.cs Serialize.cs
923eae5 @sorear Redo build system; bootstrapped niecza is live
authored
12
c58db17 @mberends [Makefile] add targets aot spectest clean realclean and help
mberends authored
13 # Tell make to regard the following targets as not being filenames
14 .PHONY: all aot test spectest clean realclean
15 .PHONY: help
16
82bb637 @sorear Update bootstrap to one built against the 2.0 runtime
authored
17 libunits=CORE JSYNC
a94e021 @sorear Remove all lexical handling from grammar.
authored
18 srcunits=CClass CgOp Op OpHelpers Sig RxOp STD NieczaGrammar Metamodel \
19 OptRxSimple NAMOutput Operator NieczaActions NieczaFrontendSTD \
c984628 @sorear Remove non-dotnet backends, including nam; its role will be filled later
authored
20 NieczaPassSimplifier OptBeta NieczaPathSearch NieczaBackendDotnet \
a94e021 @sorear Remove all lexical handling from grammar.
authored
21 NieczaCompiler GetOptLong
923eae5 @sorear Redo build system; bootstrapped niecza is live
authored
22
9083142 @sorear Switch to single-AppDomain execution
authored
23 all: run/Niecza.exe obj/Run.Kernel.dll obj/Run.CORE.dll
c58db17 @mberends [Makefile] add targets aot spectest clean realclean and help
mberends authored
24 @git describe --tags > VERSION
eab7f8a @sorear Add test and p6eval make targets
authored
25
ac88a90 @sorear Use Makefile to control building of compiler modules
authored
26 $(patsubst %,boot/obj/%.nam,$(srcunits)): boot/obj/%.nam: .fetch-stamp src/%.pm6 boot/obj/CORE.nam
27 cd src && $(RUN_CLR) ../boot/run/Niecza.exe -Bnam -C $*
28 $(RUN_CLR) boot/obj/CLRBackend.exe boot/obj $*.nam $*.dll 0
29
9083142 @sorear Switch to single-AppDomain execution
authored
30 obj/Run.CORE.dll: run/Niecza.exe obj/Run.Kernel.dll lib/CORE.setting
1b13b31 @sorear Auto-compile setting on make to end p6eval timeouts
authored
31 $(RUN_CLR) run/Niecza.exe -C CORE
32
ac88a90 @sorear Use Makefile to control building of compiler modules
authored
33 run/Niecza.exe: .fetch-stamp $(patsubst %,boot/obj/%.nam,$(srcunits)) src/niecza
34 cd src && $(RUN_CLR) ../boot/run/Niecza.exe -c -Bnam niecza
923eae5 @sorear Redo build system; bootstrapped niecza is live
authored
35 $(RUN_CLR) boot/obj/CLRBackend.exe boot/obj MAIN.nam MAIN.exe 1
b85eeeb @sorear Redesign to cross-domain communication system
authored
36 $(CP) $(patsubst %,boot/obj/%.dll,Kernel CompilerBlob $(libunits) $(srcunits)) run/
923eae5 @sorear Redo build system; bootstrapped niecza is live
authored
37 $(CP) boot/obj/MAIN.exe run/Niecza.exe
38
39 .fetch-stamp: FETCH_URL
40 -rm -rf boot/
41 mkdir boot
42 wget --no-check-certificate -Oboot/niecza.zip $$(cat FETCH_URL)
43 cd boot && unzip niecza.zip
24e0bb1 @sorear Do not use bootstrap compiler in multi-compile mode
authored
44 $(RUN_CLR) boot/run/Niecza.exe -C CORE
45 $(RUN_CLR) boot/run/Niecza.exe -C JSYNC
923eae5 @sorear Redo build system; bootstrapped niecza is live
authored
46 touch .fetch-stamp
47
b85eeeb @sorear Redesign to cross-domain communication system
authored
48 boot/obj/CompilerBlob.dll: .fetch-stamp src/CompilerBlob.cs
49 $(CSC) /target:library /out:boot/obj/CompilerBlob.dll /r:Kernel \
876ee08 @sorear Fix build
authored
50 /lib:boot/obj src/CompilerBlob.cs
9083142 @sorear Switch to single-AppDomain execution
authored
51 obj/Run.Kernel.dll: $(patsubst %,lib/%,$(cskernel))
52 $(CSC) /target:exe /out:obj/Run.Kernel.dll /lib:obj /unsafe+ \
b85eeeb @sorear Redesign to cross-domain communication system
authored
53 $(patsubst %,lib/%,$(cskernel))
000cc77 @sorear Checkpoint new bootstrap attempt
authored
54 obj/Kernel.dll: $(patsubst %,lib/%,$(cskernel))
55 $(CSC) /target:exe /out:obj/Kernel.dll /lib:obj /unsafe+ \
56 $(patsubst %,lib/%,$(cskernel))
eab7f8a @sorear Add test and p6eval make targets
authored
57
1e1a24e @pmurias Eval runs basic perl5 code. The Makefile needs review to check if it can
pmurias authored
58 perl5: obj/Perl5Interpreter.dll obj/p5embed.so
e5a3ec5 @pmurias Evaling perl5 code loads the Perl5Interpreter class.
pmurias authored
59 obj/Perl5Interpreter.dll: obj/Kernel.dll lib/Perl5Interpreter.cs
1c5bb04 @sorear Small refactor to AssemblyBuilder setup, start thaw coding
authored
60 $(CSC) /target:library /lib:obj /out:obj/Perl5Interpreter.dll /r:Kernel.dll lib/Perl5Interpreter.cs
eab7f8a @sorear Add test and p6eval make targets
authored
61
1e1a24e @pmurias Eval runs basic perl5 code. The Makefile needs review to check if it can
pmurias authored
62 obj/p5embed.so: lib/p5embed.c
6c08103 @pmurias remove unnecessary -soname option when compiling the perl5 wrapper
pmurias authored
63 cc -shared -o obj/p5embed.so lib/p5embed.c `perl -MExtUtils::Embed -e ccopts -e ldopts`
1e1a24e @pmurias Eval runs basic perl5 code. The Makefile needs review to check if it can
pmurias authored
64
8851938 @mberends [now] refactor the underlying function names and tweak 'make aot'
mberends authored
65 aot: all
f5dc966 @sorear Rename Cursor.new to avoid conflicting with code that pretends gramma…
authored
66 mono --aot run/*.dll obj/Run.CORE.dll run/Niecza.exe
c58db17 @mberends [Makefile] add targets aot spectest clean realclean and help
mberends authored
67
eab7f8a @sorear Add test and p6eval make targets
authored
68 test: all
69 $(RUN_CLR) run/Niecza.exe -c test.pl
9ceaa8e @sorear Regularize Any/Mu variable handling
authored
70 prove -e "$(RUN_CLR)" obj/Run.MAIN.exe
eab7f8a @sorear Add test and p6eval make targets
authored
71
c58db17 @mberends [Makefile] add targets aot spectest clean realclean and help
mberends authored
72 spectest: all
73 @t/run_spectests
74
eab7f8a @sorear Add test and p6eval make targets
authored
75 p6eval: all
76 $(RUN_CLR) run/Niecza.exe -C CORE Test JSYNC
c58db17 @mberends [Makefile] add targets aot spectest clean realclean and help
mberends authored
77
78 clean:
e66416c @pmurias make clean now removes .so files from obj
pmurias authored
79 @rm -f obj/*.dll obj/*.exe obj/*.nam obj/*.so
185c435 @sorear Add a Makefile rule to build and test release tarballs
authored
80 @rm -f run/Niecza.exe
81 @rm -f run/*.dll
82 @rm -f run/*.dll.so
83 @rm -fr *~
84
000cc77 @sorear Checkpoint new bootstrap attempt
authored
85 # uses the current niecza to set up a build area for the next stage
86 mknext: run/Niecza.exe obj/Run.Kernel.dll obj/Kernel.dll
87 rm -rf next/
88 mkdir -p next next/boot next/obj next/run next/boot next/boot/obj/
89 touch next/FETCH_URL next/.fetch-stamp
90 cp -a src/ lib/ Newmakefile next/
91 cp Newmakefile next/Makefile
92 cp -a run/ lib/ next/boot/
93 cp obj/Run.Kernel.dll obj/Kernel.dll next/boot/obj/
94 NIECZA_KEEP_IL=1 $(RUN_CLR) next/boot/run/Niecza.exe -C $(libunits)
95
3fd815c @sorear Partial revert of low-ranking optimization that broke build
authored
96 half_reboot: all
185c435 @sorear Add a Makefile rule to build and test release tarballs
authored
97 # setup a clean build area
98 rm -rf stage2/ stage3/
4d3df1b @sorear Finish fixing up make reboot
authored
99 mkdir -p stage2/obj stage2/run stage2/boot stage2/boot/obj \
100 stage3/obj stage3/run stage3/boot stage3/boot/obj
185c435 @sorear Add a Makefile rule to build and test release tarballs
authored
101 touch stage2/FETCH_URL stage3/FETCH_URL stage2/.fetch-stamp \
102 stage3/.fetch-stamp
4d3df1b @sorear Finish fixing up make reboot
authored
103 cp -a src/ lib/ Makefile stage2/
104 cp -a src/ lib/ Makefile stage3/
185c435 @sorear Add a Makefile rule to build and test release tarballs
authored
105 # build a current Niecza with current Niecza
b85eeeb @sorear Redesign to cross-domain communication system
authored
106 cp obj/Kernel.dll obj/CLRBackend.exe stage2/boot/obj
185c435 @sorear Add a Makefile rule to build and test release tarballs
authored
107 cp -a lib run stage2/boot
108 cd stage2 && $(RUN_CLR) boot/run/Niecza.exe -C CORE JSYNC
3fd815c @sorear Partial revert of low-ranking optimization that broke build
authored
109 cp test.pl stage2/
110 cd stage2 && $(MAKE) test
111
112 reboot: half_reboot
185c435 @sorear Add a Makefile rule to build and test release tarballs
authored
113 # verify that the new Niecza can build itself correctly
b85eeeb @sorear Redesign to cross-domain communication system
authored
114 cp stage2/obj/Kernel.dll stage2/obj/CLRBackend.exe stage3/boot/obj
185c435 @sorear Add a Makefile rule to build and test release tarballs
authored
115 cp -a lib stage2/run stage3/boot
116 cd stage3 && $(RUN_CLR) boot/run/Niecza.exe -C CORE JSYNC
4d3df1b @sorear Finish fixing up make reboot
authored
117 cp test.pl stage3/
185c435 @sorear Add a Makefile rule to build and test release tarballs
authored
118 cd stage3 && $(MAKE) test
119 # yay, stage2/ looks like a good new bootstrap version
4d3df1b @sorear Finish fixing up make reboot
authored
120 # clean up the stuff that should NOT go into the boot
f6cf9b5 @sorear Leave confusing files out of binary
authored
121 cd stage2 && rm -rf lib/*.cs obj/* src boot VERSION FETCH_URL \
122 Makefile test.pl
b85eeeb @sorear Redesign to cross-domain communication system
authored
123 cp obj/Kernel.dll obj/CLRBackend.exe stage2/obj
185c435 @sorear Add a Makefile rule to build and test release tarballs
authored
124 cp -a LICENSE README.pod docs/ stage2/
125 cd stage2 && zip -9r ../NewNieczaBootstrap.zip *
c58db17 @mberends [Makefile] add targets aot spectest clean realclean and help
mberends authored
126
127 realclean: clean
128 @rm .fetch-stamp
129
130 help:
131 @echo ''
132 @echo 'You can make the following targets in this Niecza Makefile:'
133 @echo ''
134 @echo 'all the main Niecza compiler and runtime files (default)'
135 @echo 'aot Ahead of Time compile run/Niecza.exe and run/*.dll (increases speed)'
136 @echo 'test run/Niecza.exe test.pl'
137 @echo 'spectest t/run_spectests'
138 @echo 'clean remove all generated files'
139 @echo 'realclean clean and also require new download of bootstrap files'
140 @echo 'help this list of targets'
141 @echo ''
142
b85eeeb @sorear Redesign to cross-domain communication system
authored
143 boot/obj/NieczaBackendDotnet.nam: boot/obj/CompilerBlob.dll
144
612a7b7 @sorear Eliminate Beta as a separate pass, inline subs during the parse
authored
145 # grep -r '^use' src/*.pm6 | sed 's|src/\(.*\)\.pm6:use \(.*\);|boot/obj/\1.nam: boot/obj/\2.nam|' | grep -v MONKEY_TYPING
ac88a90 @sorear Use Makefile to control building of compiler modules
authored
146 boot/obj/NAMOutput.nam: boot/obj/JSYNC.nam
147 boot/obj/NAMOutput.nam: boot/obj/Metamodel.nam
148 boot/obj/NAMOutput.nam: boot/obj/Sig.nam
149 boot/obj/NieczaActions.nam: boot/obj/Op.nam
150 boot/obj/NieczaActions.nam: boot/obj/RxOp.nam
151 boot/obj/NieczaActions.nam: boot/obj/Sig.nam
152 boot/obj/NieczaActions.nam: boot/obj/CClass.nam
153 boot/obj/NieczaActions.nam: boot/obj/OpHelpers.nam
154 boot/obj/NieczaActions.nam: boot/obj/Operator.nam
155 boot/obj/NieczaBackendDotnet.nam: boot/obj/NAMOutput.nam
156 boot/obj/NieczaCompiler.nam: boot/obj/JSYNC.nam
157 boot/obj/NieczaFrontendSTD.nam: boot/obj/STD.nam
158 boot/obj/NieczaFrontendSTD.nam: boot/obj/NieczaGrammar.nam
159 boot/obj/NieczaFrontendSTD.nam: boot/obj/NieczaActions.nam
160 boot/obj/NieczaGrammar.nam: boot/obj/STD.nam
161 boot/obj/Operator.nam: boot/obj/Sig.nam
162 boot/obj/Operator.nam: boot/obj/OpHelpers.nam
163 boot/obj/Op.nam: boot/obj/CgOp.nam
612a7b7 @sorear Eliminate Beta as a separate pass, inline subs during the parse
authored
164 boot/obj/OptBeta.nam: boot/obj/CgOp.nam
ac88a90 @sorear Use Makefile to control building of compiler modules
authored
165 boot/obj/OptRxSimple.nam: boot/obj/RxOp.nam
166 boot/obj/RxOp.nam: boot/obj/CgOp.nam
167 boot/obj/RxOp.nam: boot/obj/CClass.nam
168 boot/obj/Sig.nam: boot/obj/CgOp.nam
Something went wrong with that request. Please try again.