Skip to content

HTTPS clone URL

Subversion checkout URL

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