|
79 | 79 | $config{'cpsep'} = $^O eq 'MSWin32' ? ';' : ':';
|
80 | 80 | $config{'slash'} = $slash;
|
81 | 81 |
|
| 82 | + open my $MAKEFILE, '>', 'Makefile' |
| 83 | + or die "Cannot open 'Makefile' for writing: $!"; |
| 84 | + |
| 85 | + fill_template_file( |
| 86 | + 'tools/build/Makefile-common.in', |
| 87 | + $MAKEFILE, |
| 88 | + %config, |
| 89 | + ); |
| 90 | + |
82 | 91 | if ($backends{parrot}) {
|
83 | 92 | my $with_parrot = $options{'with-parrot'};
|
84 | 93 | my $gen_parrot = $options{'gen-parrot'};
|
|
169 | 178 | }
|
170 | 179 |
|
171 | 180 | fill_template_file(
|
172 |
| - ['tools/build/Makefile-common.in', 'tools/build/Makefile-Parrot.in'], 'Makefile', |
| 181 | + 'tools/build/Makefile-Parrot.in', $MAKEFILE, |
173 | 182 | %config,
|
174 | 183 | );
|
175 | 184 | fill_template_file('src/vm/parrot/nqp.sh', 'gen/parrot/nqp_launcher', %config);
|
|
194 | 203 | $config{'make'} = $^O eq 'MSWin32' ? 'nmake' : 'make';
|
195 | 204 | $config{'runner'} = $^O eq 'MSWin32' ? 'nqp.bat' : 'nqp';
|
196 | 205 | fill_template_file(
|
197 |
| - ['tools/build/Makefile-common.in', 'tools/build/Makefile-Moar.in'], |
198 |
| - 'Makefile', |
| 206 | + 'tools/build/Makefile-common.in', |
| 207 | + $MAKEFILE, |
199 | 208 | %config,
|
200 | 209 | );
|
201 |
| - |
202 | 210 | }
|
| 211 | + |
203 | 212 | if ($backends{jvm}) {
|
204 | 213 | my @errors;
|
205 | 214 |
|
|
237 | 246 | $config{'runner'} = $^O eq 'MSWin32' ? 'nqp.bat' : 'nqp';
|
238 | 247 |
|
239 | 248 | fill_template_file(
|
240 |
| - ['tools/build/Makefile-common.in', 'tools/build/Makefile-JVM.in'], |
241 |
| - 'Makefile', |
| 249 | + 'tools/build/Makefile-JVM.in', |
| 250 | + $MAKEFILE, |
242 | 251 | %config,
|
243 | 252 | );
|
244 | 253 | }
|
245 | 254 |
|
| 255 | + close $MAKEFILE |
| 256 | + or die "Error while writing to 'Makefile': $!"; |
| 257 | + |
246 | 258 | my $make = fill_template_text('@make@', %config);
|
247 | 259 | unless ($options{'no-clean'}) {
|
248 | 260 | no warnings;
|
|
0 commit comments