Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 670 lines (435 sloc) 15.341 kb
3ace369 Jerry Gay #39826: [CAGE] convert C<perl -w> to C<use warnings;>
particle authored
1 #! perl
29b08db Bernhard Schmalhofer Require Perl 5.6.0, not 5.8.0, in Configure.pl.
bschmalhofer authored
2
110c52f allisonrandal [build] Add a --disable-rpath option to allow Linux packagers to build
allisonrandal authored
3 # Copyright (C) 2001-2009, Parrot Foundation.
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
4 # $Id$
11b744f Simon Cozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
5
dc40427 Will Coleda [codingstd] require version in a way that avoids a complaint from perlcr...
coke authored
6 use 5.008;
3477cc0 James E Keenan Applying patch submitted in
jkeenan authored
7 use strict;
8 use warnings;
9 use lib 'lib';
10
11 use Parrot::Configure;
12 use Parrot::Configure::Options qw( process_options );
13 use Parrot::Configure::Options::Test;
a725b2f James E Keenan Refactor preparatory code found in lib/Parrot/Configure/Options/Test.pm ...
jkeenan authored
14 use Parrot::Configure::Options::Test::Prepare qw(
15 get_preconfiguration_tests
16 get_postconfiguration_tests
17 );
3477cc0 James E Keenan Applying patch submitted in
jkeenan authored
18 use Parrot::Configure::Messages qw(
19 print_introduction
20 print_conclusion
21 );
b65b944 NotFound Update .parrot_current_rev in Configure if possible
NotFound authored
22 use Parrot::Revision;
3477cc0 James E Keenan Applying patch submitted in
jkeenan authored
23
24 $| = 1; # $OUTPUT_AUTOFLUSH = 1;
25
26 # Install Option text was taken from:
27 #
28 # autoconf (GNU Autoconf) 2.59
29 # Written by David J. MacKenzie and Akim Demaille.
30 #
31 # Copyright (C) 2003 Free Software Foundation, Inc.
32 # This is free software; see the source for copying conditions. There is NO
33 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34
35 # from Parrot::Configure::Options
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
36 my ($args, $steps_list_ref) = process_options(
3477cc0 James E Keenan Applying patch submitted in
jkeenan authored
37 {
468e958 James E Keenan Check for whether $ARGV[0] to avoid uninitialized value warning when cal...
jkeenan authored
38 mode => (defined $ARGV[0] and $ARGV[0] =~ /^--file=/)
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
39 ? 'file'
40 : 'configure',
3477cc0 James E Keenan Applying patch submitted in
jkeenan authored
41 argv => [@ARGV],
42 }
43 );
44 exit(1) unless defined $args;
45
46 my $opttest = Parrot::Configure::Options::Test->new($args);
47
48 # configuration tests will only be run if you requested them
49 # as command-line option
a725b2f James E Keenan Refactor preparatory code found in lib/Parrot/Configure/Options/Test.pm ...
jkeenan authored
50 $opttest->run_configure_tests( get_preconfiguration_tests() );
3477cc0 James E Keenan Applying patch submitted in
jkeenan authored
51
52 my $parrot_version = $Parrot::Configure::Options::Conf::parrot_version;
53
54 # from Parrot::Configure::Messages
55 print_introduction($parrot_version);
56
b65b944 NotFound Update .parrot_current_rev in Configure if possible
NotFound authored
57 # Update revision number if needed
58 Parrot::Revision::update();
59
a5b614c Bernhard Schmalhofer [config]
bschmalhofer authored
60 my $conf = Parrot::Configure->new();
3477cc0 James E Keenan Applying patch submitted in
jkeenan authored
61
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
62 $conf->add_steps( @{ $steps_list_ref } );
3477cc0 James E Keenan Applying patch submitted in
jkeenan authored
63
64 # from Parrot::Configure::Data
65 $conf->options->set( %{$args} );
8963c6e Reini Urban [config] Enable make reconfig. RT #58034
rurban authored
66 # save the command-line for make reconfig
7e8b86b Reini Urban RT#58034: make reconfig, fix a cornercase when no args are given
rurban authored
67 $conf->data->set(configure_args => @ARGV ? '"'.join("\" \"", map {qq($_)} @ARGV).'"'
68 : '');
3477cc0 James E Keenan Applying patch submitted in
jkeenan authored
69
d154d3a James E Keenan Reposition one inline comment; add another.
jkeenan authored
70 # Log files created by Configure.pl in MANIFEST.configure.generated
7bb2d0e James E Keenan Applying patch submitted in
jkeenan authored
71 $conf->{active_configuration} = 1;
20990ff Moritz Lenz [config] simplification suggested by DietCoke++
moritz authored
72 unlink 'MANIFEST.configure.generated';
d154d3a James E Keenan Reposition one inline comment; add another.
jkeenan authored
73
74 # Run the actual steps from Parrot::Configure
3477cc0 James E Keenan Applying patch submitted in
jkeenan authored
75 $conf->runsteps or exit(1);
76
77 # build tests will only be run if you requested them
78 # as command-line option
a725b2f James E Keenan Refactor preparatory code found in lib/Parrot/Configure/Options/Test.pm ...
jkeenan authored
79 $opttest->run_build_tests( get_postconfiguration_tests() );
3477cc0 James E Keenan Applying patch submitted in
jkeenan authored
80
81 my $make = $conf->data->get('make');
82 # from Parrot::Configure::Messages
83 ( print_conclusion( $conf, $make ) ) ? exit 0 : exit 1;
84
85 ################### DOCUMENTATION ###################
86
756762f *** empty log message ***
Michael Scott authored
87 =head1 NAME
54d55b6 Patch from Nicholas Clark <nick@unfortu.net>: stops silly people
Josh Wilmes authored
88
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
89 Configure.pl - Parrot's configuration script
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
90
756762f *** empty log message ***
Michael Scott authored
91 =head1 SYNOPSIS
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
92
756762f *** empty log message ***
Michael Scott authored
93 % perl Configure.pl [options]
6d36c2d bunch of patches:
Leopold Toetsch authored
94
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
95 or:
96
97 % perl Configure.pl --file=/path/to/configuration/directives
98
756762f *** empty log message ***
Michael Scott authored
99 =head1 DESCRIPTION
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
100
d10b19e Andy Lester Perl programs are programs, not scripts
petdance authored
101 This is Parrot's configuration program. It should be run to create
102 the necessary system-specific files before building Parrot.
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
103
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
104 We now offer two interfaces to configuration:
105
106 =over 4
107
108 =item * Command-Line Interface
c15d8e5 Added 'reconfig' make target and corresponding --reconfig option to
Gregor N. Purdy authored
109
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
110 All configuration options are placed on the command-line. You may request
111 interactive configuration with the C<--ask> option. You may not use the
112 C<--file> option, as that is reserved for the Configuration-File interface.
c15d8e5 Added 'reconfig' make target and corresponding --reconfig option to
Gregor N. Purdy authored
113
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
114 =item * Configuration-File Interface
115
116 All configuration options are placed in a special configuration file whose
117 full path is invoked on the command-line as
118 C<--file=/path/to/configuration/directives> as the sole command-line option.
119 You may not request interactive configuration. For specific instructions, see
120 L</"CONFIGURATION-FILE INTERFACE"> below.
121
122 =back
123
124 =head2 General Options
125
126 =over 4
ad4983c add --optimize Configure option
Leopold Toetsch authored
127
756762f *** empty log message ***
Michael Scott authored
128 =item C<--help>
205f653 Brent Royal-Gordon Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST chec...
brentdax authored
129
756762f *** empty log message ***
Michael Scott authored
130 Prints out a description of the options and exits.
ad4983c add --optimize Configure option
Leopold Toetsch authored
131
756762f *** empty log message ***
Michael Scott authored
132 =item C<--version>
0fc6ac6 Brent Royal-Gordon Configure.pl 2.0.
brentdax authored
133
756762f *** empty log message ***
Michael Scott authored
134 Prints out the version number of Configure.pl and exits.
c0142c7 memory allocation rework
Dan Sugalski authored
135
756762f *** empty log message ***
Michael Scott authored
136 =item C<--verbose>
c0142c7 memory allocation rework
Dan Sugalski authored
137
6f5b538 Joshua Hoblitt podtidy configure files
jhoblitt authored
138 Tells Configure.pl to output extra information about the configuration data it
139 is setting.
c15d8e5 Added 'reconfig' make target and corresponding --reconfig option to
Gregor N. Purdy authored
140
ab81b8c Brent Royal-Gordon Configure output cleanup. Retasks --verbose to include the old output f...
brentdax authored
141 =item C<--verbose=2>
142
dacbc40 ICU config patch - use systems ICU
Leopold Toetsch authored
143 Tells Configure.pl to output information about i<every> setting added or
ab81b8c Brent Royal-Gordon Configure output cleanup. Retasks --verbose to include the old output f...
brentdax authored
144 changed.
145
d79c782 James E Keenan Applying patch submitted in
jkeenan authored
146 =item C<--verbose-step={N|regex}>
567c2b1 new Configure options: verbose-step
Leopold Toetsch authored
147
d79c782 James E Keenan Applying patch submitted in
jkeenan authored
148 Run C<--verbose=2> for step number C<N> or matching description.
567c2b1 new Configure options: verbose-step
Leopold Toetsch authored
149
a5e7643 James E Keenan Committing patch submitted for RT 45523 and 45525. Add --fatal and
jkeenan authored
150 =item C<--fatal>
151
152 Tells Configure.pl to halt completely if any configuration step fails.
153
154 =item C<--fatal-step={init::alpha,inter::beta,auto::gamma}>
155
156 Tells Configure.pl to halt completely if any configuration step in
157 comma-delimited string individually fails.
158
756762f *** empty log message ***
Michael Scott authored
159 =item C<--nomanicheck>
85a1fcc reenable debugging=1 default
Leopold Toetsch authored
160
756762f *** empty log message ***
Michael Scott authored
161 Tells Configure.pl not to run the MANIFEST check.
11b744f Simon Cozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
162
20fed4c Add a --prefix argument to Configure.pl to set the installation prefix
Nicholas Clark authored
163 =item C<--prefix>
164
165 Sets the location where parrot will be installed.
166
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
167 =item C<--ask>
de4d079 Add conditional configurations for testy code.
Melvin Smith authored
168
570f6d4 James E Keenan Remove configuration probe for asynchronous input/output per architect's...
jkeenan authored
169 This turns on the user prompts during configuration. Available only in
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
170 Command-Line interface. Not available in Configuration-File interface.
6fba438 Simon Cozens Abstract the argument and opcode packing types and functions out into
simoncozens authored
171
84c64a2 James E Keenan Applying to trunk patch submitted in RT 42690. particle requested a '--...
jkeenan authored
172 =item C<--test>
173
174 Run certain tests along with F<Configure.pl>:
175
176 =over 4
177
178 =item C<--test=configure>
179
180 Run tests found in F<t/configure/> I<before> beginning configuration. These
181 tests demonstrate that Parrot's configuration tools will work properly once
182 configuration has begun.
183
184 =item C<--test=build>
185
272ac52 James E Keenan Some prerequisites for successful operation of buildtools_tests are no l...
jkeenan authored
186 Run tests found in F<t/steps/>, F<t/postconfigure/> and F<t/pharness>.
84c64a2 James E Keenan Applying to trunk patch submitted in RT 42690. particle requested a '--...
jkeenan authored
187
188 =item C<--test>
189
190 Run the tests described in C<--test=configure>, conduct configuration, then
191 run the tests described in C<--test=build>.
192
193 =back
194
52494c2 James E Keenan Merge darwin2hints branch into trunk. Functionality for detecting Fink ...
jkeenan authored
195 =item C<--configure_trace>
196
197 Store the results of each configuration step in a Storable F<.sto> file on
198 disk, for later analysis by F<Parrot::Configure::Trace> methods.
199
200 =item Operating system-specific configuration options
201
202 =over 4
203
bc26b63 Daniel Arbelo Arrocha Make the used hints file overridable on the Configure.pl command line.
darbelo authored
204 =item C<--hintsfile=filename>
205
206 Use filename as the hints file.
207
52494c2 James E Keenan Merge darwin2hints branch into trunk. Functionality for detecting Fink ...
jkeenan authored
208 =item C<--darwin_no_fink>
209
210 On Darwin, do not probe for Fink libraries.
211
212 =item C<--darwin_no_macports>
213
214 On Darwin, do not probe for Macports libraries.
215
216 =back
217
756762f *** empty log message ***
Michael Scott authored
218 =back
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
219
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
220 =head2 Compile Options
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
221
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
222 =over 4
19fa0d4 Tom Hughes Stop Configure trying to make op_info.c and op.h as op_info.c no longer
tomhughes authored
223
756762f *** empty log message ***
Michael Scott authored
224 =item C<--debugging=0>
bc2ee1d Brent Royal-Gordon Minor cleanup and enhancements.
brentdax authored
225
756762f *** empty log message ***
Michael Scott authored
226 Debugging is turned on by default. Use this to disable it.
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
227
82a8718 Jerry Gay config: add --parrot_is_shared option to docs
particle authored
228 =item C<--parrot_is_shared>
229
230 Link parrot dynamically.
231
2ddc05f [config] New Configure.pl option --m=32
Leopold Toetsch authored
232 =item C<--m=32>
233
fe05e8a Alberto Simões Some enhancements on linelength.t
ambs authored
234 Create a 32-bit executable on 64-architectures like x86_64. This
fb5eae8 James E Keenan POD formatting corrections only.
jkeenan authored
235 option appends C<-m32> to compiler and linker programs and does
236 C<s/lib64/lib/g> on link flags.
2ddc05f [config] New Configure.pl option --m=32
Leopold Toetsch authored
237
238 This option is experimental. See F<config/init/defaults.pm> for more.
239
62c60b6 really speed up oo1.pasm by 2
Leopold Toetsch authored
240 =item C<--profile>
241
242 Turn on profiled compile (gcc only for now)
243
efd9dcb Paul Cochrane Added --cage option. Part of patch (#39802) courtesy of Kevin Tew
paultcochrane authored
244 =item C<--cage>
245
246 [CAGE] compile includes many additional warnings
247
756762f *** empty log message ***
Michael Scott authored
248 =item C<--optimize>
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
249
fb5eae8 James E Keenan POD formatting corrections only.
jkeenan authored
250 Add Perl 5's C<$Config{optimize}> to the compiler flags.
2fc8aec Bernhard Schmalhofer This patch makes it easier to compile parrot with a compiler other than
bschmalhofer authored
251
252 =item C<--optimize=flags>
253
254 Add C<flags> to the compiler flags.
756762f *** empty log message ***
Michael Scott authored
255
256 =item C<--inline>
257
258 Tell Configure that the compiler supports C<inline>.
259
260 =item C<--cc=(compiler)>
261
262 Specify which compiler to use.
263
264 =item C<--ccflags=(flags)>
265
266 Use the given compiler flags.
267
268 =item C<--ccwarn=(flags)>
269
270 Use the given compiler warning flags.
271
c528c23 The following patch enables the user to control which compilers get
Leopold Toetsch authored
272 =item C<--cxx=(compiler)>
273
274 Specify which C++ compiler to use (for ICU).
275
756762f *** empty log message ***
Michael Scott authored
276 =item C<--libs=(libs)>
277
278 Use the given libraries.
279
280 =item C<--link=(linker)>
281
282 Specify which linker to use.
283
284 =item C<--linkflags=(flags)>
285
286 Use the given linker flags
287
288 =item C<--ld=(linker)>
289
290 Specify which loader to use for shared libraries.
291
292 =item C<--ldflags=(flags)>
293
294 Use the given loader flags for shared libraries
295
110c52f allisonrandal [build] Add a --disable-rpath option to allow Linux packagers to build
allisonrandal authored
296 =item C<--disable-rpath>
297
298 Specify that rpath should not be included in linking flags. With this
299 configuration option, you must append the library build directory
300 (usually blib/lib) to the LD_LIBRARY_PATH environment variable (or your
301 platform equivalent). This option is primarily used for building Linux
302 packages.
303
756762f *** empty log message ***
Michael Scott authored
304 =item C<--lex=(lexer)>
305
306 Specify which lexer to use.
307
308 =item C<--yacc=(parser)>
309
310 Specify which parser to use.
0846288 various patches 2
Leopold Toetsch authored
311
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
312 =item C<--define=val1[,val2]>
313
6f5b538 Joshua Hoblitt podtidy configure files
jhoblitt authored
314 Generate "#define PARROT_DEF_VAL1 1" ... entries in has_header.h. Currently
315 needed to use inet_aton for systems that lack inet_pton:
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
316
317 --define=inet_aton
318
a4c21ab James E Keenan Applying patch supplied by bsdz in https://trac.parrot.org/parrot/ticket...
jkeenan authored
319 =item C<--no-line-directives>
320
321 Disables the creation of C #line directives when generating C from PMCs and
322 ops. Useful when debugging internals.
3b2baf4 Will Coleda Remove trailing whitespace
coke authored
323
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
324 =back
325
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
326 =head2 Parrot Options
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
327
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
328 =over 4
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
329
756762f *** empty log message ***
Michael Scott authored
330 =item C<--intval=(type)>
331
332 Use the given type for C<INTVAL>.
333
334 =item C<--floatval=(type)>
335
336 Use the given type for C<FLOATVAL>.
337
338 =item C<--opcode=(type)>
339
340 Use the given type for opcodes.
341
342 =item C<--ops=(files)>
343
344 Use the given ops files.
345
346 =item C<--jitcapable>
347
348 Use JIT system.
349
1d4b422 Vasily Chekalkin Merge branch 'kill_jit' back to trunk.
bacek authored
350 =item C<--buildframes>
351
352 Dynamically build NCI call frames.
353
756762f *** empty log message ***
Michael Scott authored
354 =item C<--execcapable>
355
0846288 various patches 2
Leopold Toetsch authored
356 Use JIT to emit a native executable.
756762f *** empty log message ***
Michael Scott authored
357
5a9e89c [PATCH] runConfigureICU usage
Leopold Toetsch authored
358 =back
359
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
360 =head2 International Components For Unicode (ICU) Options
5a9e89c [PATCH] runConfigureICU usage
Leopold Toetsch authored
361
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
362 =over 4
5a9e89c [PATCH] runConfigureICU usage
Leopold Toetsch authored
363
acf4fa4 autodetect and use system icu installations
Jens Rieks authored
364 =item C<--icu-config=/path/to/icu-config>
365
73ba72d [perl #36057] [PATCH] Fix some typos - 5
Leopold Toetsch authored
366 Use the specified icu-config script to determine the necessary ICU options.
acf4fa4 autodetect and use system icu installations
Jens Rieks authored
367
6f5b538 Joshua Hoblitt podtidy configure files
jhoblitt authored
368 Use --icu-config=none to disable the autodetect feature. Parrot will then be
369 build without ICU.
acf4fa4 autodetect and use system icu installations
Jens Rieks authored
370
6f5b538 Joshua Hoblitt podtidy configure files
jhoblitt authored
371 B<Note:> If you specify another ICU option than --icu-config, the autodetection
372 functionality will be disabled.
a194975 - removed error message if icu-config does not exists
Jens Rieks authored
373
dacbc40 ICU config patch - use systems ICU
Leopold Toetsch authored
374 =item C<--icushared=(linkeroption)>
375
5ec035c Config cleanup - icu
Leopold Toetsch authored
376 Linker command to link against ICU library.
dacbc40 ICU config patch - use systems ICU
Leopold Toetsch authored
377
378 E.g.
379
380 --icushared='-L /opt/openoffice/program -licudata -licuuc'
381
382 (The libs in openoffice are actually version 2.2 and do not work)
383
384 =item C<--icuheaders=(header_dir)>
385
6f5b538 Joshua Hoblitt podtidy configure files
jhoblitt authored
386 Location of ICU header files without the /unicode suffix.
dacbc40 ICU config patch - use systems ICU
Leopold Toetsch authored
387
388 E.g.
389
390 --icuheaders='/home/lt/icu/'
391
756762f *** empty log message ***
Michael Scott authored
392 =back
393
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
394 =head2 Other Options
205f653 Brent Royal-Gordon Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST chec...
brentdax authored
395
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
396 =over 4
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
397
b4b718e Update configuration system documentation (based on patches provided by ...
Michael Scott authored
398 =item C<--maintainer>
43a606a This patch allows parrot to mostly-build with tcc. It allows one to ski...
Dan Sugalski authored
399
6f5b538 Joshua Hoblitt podtidy configure files
jhoblitt authored
400 Use this option if you want imcc's parser and lexer files to be generated.
401 Needs a working parser and lexer.
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
402
0fc6ac6 Brent Royal-Gordon Configure.pl 2.0.
brentdax authored
403 =back
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
404
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
405 =head1 CONFIGURATION-FILE INTERFACE
406
407 In the Configuration-File interface, unlike the Command-Line interface, you
408 may delete configuration steps or run them in an order different from that
409 listed in Parrot::Configure::Step::List.
410
411 A configuration file is a plain-text file located somewhere in or under your
412 top-level Parrot directory. Unless indicated otherwise, all lines in this
413 file must have no leading whitespace. As in Perl 5, lines beginning with C<#>
414 marks are comments and are ignored during parsing of the file. Unlike Perl 5,
415 you may not begin comments in the middle of a line.
416
417 The configuration file must contain these three sections:
418
419 =over 4
420
421 =item * variables
422
423 =over 4
424
425 =item *
426
427 Section begins with line C<=variables> and must be followed by at least one
428 blank line. All other content in this section is optional.
429
430 =item *
431
432 Section may contain one or more I<key=value> pairs which assign strings to
433 variables much in the way that you would do in a shell script wrapping around
434 F<Configure.pl>.
435
436 =variables
437
438 CC=/usr/bin/gcc
439 CX=/usr/bin/g++
440
441 So if you typically invoked F<Configure.pl> by wrapping it in a shell script
442 for the purpose of setting environmental variables used in options, like this:
443
444 CC="/usr/bin/gcc"
445 CX="/usr/bin/g++"
446 /usr/local/bin/perl Configure.pl \
447 --cc="$CC" \
448 --cxx="$CX" \
449 --link="$CX" \
450 --ld="$CX"
451
452 ... you would now place the assignments to C<CC> and C<CX> in the
453 I<=variables> section of the configuration file (as above).
454
455 =back
456
457 =item * general
458
459 =over 4
460
461 =item *
462
463 Section begins with line C<=general> and must be followed by at least one
464 blank line. All other content in this section is optional.
465
466 =item *
467
468 This section is the location recommended for listing options whose impact is
469 not conceptually limited to a single step. It is also the location where the
470 variables defined in the I<=variables> section are assigned to particular
471 Parrot configuration options. Entries in this section must be either
472 I<option=value> pairs or be options which will be assigned a true value.
473
474 cc=$CC
475 cxx=$CX
476 link=$CX
477 ld=/usr/bin/g++
478 verbose
479
480 Note that when the value is a variable defined in the I<=variables> section,
481 it must be preceded by a C<$> sign.
482
483 =item *
484
485 You I<may> list options here which are I<conceptually> limited to a single
486 configuration step. For example, if you wished to skip validation of the
487 F<MANIFEST> during configuration and to configure without ICU, you I<could>,
488 in this section, say:
489
490 nomanicheck
491 without-icu
492
493 However, as we shall quickly see, it's conceptually clearer to place these
494 values next to those configuration steps that actually use them.
495
496 =back
497
498 =item * steps
499
500 =over 4
501
502 =item *
503
504 Section begins with line C<=steps> and must be followed by at least one
505 blank line, in turn followed by the list of configuration steps, followed by
506 another blank line followed by a line C<=cut> (just like POD).
507
508 =item *
509
510 The order in which you list the steps is the order in which they will be
511 executed. If you delete a step from the canonical list or comment a step out,
512 it will not be executed.
513
514 ...
515 auto::snprintf
516 # auto::perldoc
517 auto::ctags
518 ...
519
520 In the above example, step C<auto::perldoc> will be completely skipped. You
521 will not see it listed as C<....skipped> in F<Configure.pl>'s output; it will
522 simply not be there at all.
523
524 =item *
525
526 This is the recommended location to call options whose impact is
527 I<conceptually> limited to a single configuration step. Type the
528 configuration step's name, type a whitespace, type the option (with no leading
529 C<-->) and repeat as needed for additional step-specific options.
530
531 init::manifest nomanicheck
532 ...
533
534 =item *
535
536 This is also the location to call options whose impact is limited to one step
537 at a time but which may be applied to more than one configuration step. The
538 C<fatal-step> and C<verbose-step> options are the best examples of this case.
539 Rather than requesting verbose output from all configuration steps, you may,
540 for example, wish to designate only a few steps for verbose output:
541
542 ...
543 init::hints verbose-step
544 init::headers
545 inter::progs fatal-step
546 ...
547 auto::gcc verbose-step
548 ...
549
550 In the above example, F<Configure.pl> will grind to a halt if C<inter::progs>
551 does not complete successfully. You will get verbose output only from
552 C<init::hints> and C<auto::gcc>; the other 60+ steps will be terse.
553
554 =item *
555
556 Nothing prevents you from listing general options anywhere in this section.
557
558 init::manifest nomanicheck cc=$CC ld=/usr/bin/g++ verbose
559 init::defaults
560 ...
561
562 That will work -- but why would you want to do something that messy?
563
564 =back
565
566 =back
567
568 =head2 Example
569
570 Ignoring leading whitespace, this is an example of a correctly formed
571 configuration file.
572
573 =variables
574
575 CC=/usr/bin/gcc
576 CX=/usr/bin/g++
577
578 =general
579
580 cc=$CC
581 cxx=$CX
582 link=$CX
583 ld=/usr/bin/g++
584
585 =steps
586
587 init::manifest nomanicheck
588 init::defaults
589 init::install
590 init::hints verbose-step
591 init::headers
592 inter::progs
593 inter::make
594 inter::lex
595 inter::yacc
596 auto::gcc
597 auto::glibc
598 auto::backtrace
599 auto::fink
600 auto::macports
601 auto::msvc
602 auto::attributes
603 auto::warnings
604 init::optimize
605 inter::shlibs
606 inter::libparrot
607 inter::charset
608 inter::encoding
609 inter::types
610 auto::ops
611 auto::alignptrs
612 auto::headers
613 auto::sizes
614 auto::byteorder
615 auto::va_ptr
616 auto::format
617 auto::isreg
618 auto::arch
619 auto::jit
1d4b422 Vasily Chekalkin Merge branch 'kill_jit' back to trunk.
bacek authored
620 auto::frames
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
621 auto::cpu
622 auto::inline
623 auto::gc
624 auto::memalign
625 auto::signal
626 auto::socklen_t
627 auto::env
3c43d63 Peter Lobsinger add --without-extra-nci-thunks option to Configure to allow building wit...
plobsing authored
628 auto::extra_nci_thunks
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
629 auto::gmp
630 auto::readline
631 auto::pcre
632 auto::opengl
633 auto::gettext
634 auto::snprintf
635 # auto::perldoc
636 auto::ctags
637 auto::revision
638 auto::icu
639 gen::config_h
640 gen::core_pmcs
641 gen::opengl
642 gen::makefiles
643 gen::platform
644 gen::config_pm
645
646 =cut
647
648 You may see how this works in practice by calling:
649
c2f7ada James E Keenan Revise Configure.pl POD and other docs to reflect file movement.
jkeenan authored
650 perl Configure.pl --file=examples/config/file/configcompiler
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
651
652 or
653
c2f7ada James E Keenan Revise Configure.pl POD and other docs to reflect file movement.
jkeenan authored
654 perl Configure.pl --file=examples/config/file/configwithfatalstep
780cbd7 James E Keenan Merge newsc branch into trunk, implementing Configuration-File interface...
jkeenan authored
655
c9264be more config system add ons and docs
Leopold Toetsch authored
656 =head1 SEE ALSO
657
e478ac7 James E Keenan Merge fileconf branch into trunk per
jkeenan authored
658 F<lib/Parrot/Configure.pm>,
c9264be more config system add ons and docs
Leopold Toetsch authored
659 F<lib/Parrot/Configure/Step.pm>, F<docs/configuration.pod>
660
756762f *** empty log message ***
Michael Scott authored
661 =cut
aeeafc5 Brent Royal-Gordon Mention where all the files went.
brentdax authored
662
b91d268 Bernhard Schmalhofer #40278: [CAGE] perl coding standards coda.
bschmalhofer authored
663 # Local Variables:
664 # mode: cperl
665 # cperl-indent-level: 4
666 # fill-column: 100
667 # End:
668 # vim: expandtab shiftwidth=4:
25830bb James E Keenan Applying patch submitted in
jkeenan authored
669
Something went wrong with that request. Please try again.