Skip to content
This repository
Newer
Older
100644 671 lines (434 sloc) 15.515 kb
3ace369a »
2006-07-24 #39826: [CAGE] convert C<perl -w> to C<use warnings;>
1 #! perl
29b08dbc »
2006-04-23 Require Perl 5.6.0, not 5.8.0, in Configure.pl.
2
110c52f2 »
2009-03-31 [build] Add a --disable-rpath option to allow Linux packagers to build
3 # Copyright (C) 2001-2009, Parrot Foundation.
11b744f3 »
2001-09-11 Configure system from Brent Dax <brentdax@cpan.org>
4
dc404276 »
2008-07-14 [codingstd] require version in a way that avoids a complaint from per…
5 use 5.008;
3477cc06 »
2008-01-08 Applying patch submitted in
6 use strict;
7 use warnings;
46c84060 »
2010-12-30 Implement option of fully silent configuration.
8 use Data::Dumper;$Data::Dumper::Indent=1;
3477cc06 »
2008-01-08 Applying patch submitted in
9 use lib 'lib';
10
11 use Parrot::Configure;
12 use Parrot::Configure::Options qw( process_options );
13 use Parrot::Configure::Options::Test;
a725b2fc »
2008-04-19 Refactor preparatory code found in lib/Parrot/Configure/Options/Test.…
14 use Parrot::Configure::Options::Test::Prepare qw(
15 get_preconfiguration_tests
16 get_postconfiguration_tests
17 );
3477cc06 »
2008-01-08 Applying patch submitted in
18 use Parrot::Configure::Messages qw(
19 print_introduction
20 print_conclusion
21 );
b65b944f »
2008-07-15 Update .parrot_current_rev in Configure if possible
22 use Parrot::Revision;
3477cc06 »
2008-01-08 Applying patch submitted in
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
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
36 my ($args, $steps_list_ref) = process_options(
3477cc06 »
2008-01-08 Applying patch submitted in
37 {
468e9585 »
2008-08-30 Check for whether $ARGV[0] to avoid uninitialized value warning when …
38 mode => (defined $ARGV[0] and $ARGV[0] =~ /^--file=/)
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
39 ? 'file'
40 : 'configure',
3477cc06 »
2008-01-08 Applying patch submitted in
41 argv => [@ARGV],
42 }
43 );
44 exit(1) unless defined $args;
46c84060 »
2010-12-30 Implement option of fully silent configuration.
45 #print STDERR Dumper $args;
3477cc06 »
2008-01-08 Applying patch submitted in
46
47 my $opttest = Parrot::Configure::Options::Test->new($args);
48
49 # configuration tests will only be run if you requested them
50 # as command-line option
a725b2fc »
2008-04-19 Refactor preparatory code found in lib/Parrot/Configure/Options/Test.…
51 $opttest->run_configure_tests( get_preconfiguration_tests() );
3477cc06 »
2008-01-08 Applying patch submitted in
52
53 my $parrot_version = $Parrot::Configure::Options::Conf::parrot_version;
54
55 # from Parrot::Configure::Messages
46c84060 »
2010-12-30 Implement option of fully silent configuration.
56 print_introduction($parrot_version)
57 unless $args->{silent};
3477cc06 »
2008-01-08 Applying patch submitted in
58
b65b944f »
2008-07-15 Update .parrot_current_rev in Configure if possible
59 # Update revision number if needed
60 Parrot::Revision::update();
61
a5b614c0 »
2008-02-10 [config]
62 my $conf = Parrot::Configure->new();
3477cc06 »
2008-01-08 Applying patch submitted in
63
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
64 $conf->add_steps( @{ $steps_list_ref } );
3477cc06 »
2008-01-08 Applying patch submitted in
65
66 # from Parrot::Configure::Data
67 $conf->options->set( %{$args} );
8963c6e5 »
2009-02-08 [config] Enable make reconfig. RT #58034
68 # save the command-line for make reconfig
766efa78 »
2011-05-05 Minor code reformatting.
69 $conf->data->set(configure_args => @ARGV
70 ? '"'.join("\" \"", map {qq($_)} @ARGV).'"'
71 : '');
3477cc06 »
2008-01-08 Applying patch submitted in
72
d154d3a8 »
2008-08-03 Reposition one inline comment; add another.
73 # Log files created by Configure.pl in MANIFEST.configure.generated
7bb2d0eb »
2008-04-05 Applying patch submitted in
74 $conf->{active_configuration} = 1;
20990ff0 »
2008-08-25 [config] simplification suggested by DietCoke++
75 unlink 'MANIFEST.configure.generated';
d154d3a8 »
2008-08-03 Reposition one inline comment; add another.
76
77 # Run the actual steps from Parrot::Configure
3477cc06 »
2008-01-08 Applying patch submitted in
78 $conf->runsteps or exit(1);
79
80 # build tests will only be run if you requested them
81 # as command-line option
a725b2fc »
2008-04-19 Refactor preparatory code found in lib/Parrot/Configure/Options/Test.…
82 $opttest->run_build_tests( get_postconfiguration_tests() );
3477cc06 »
2008-01-08 Applying patch submitted in
83
84 my $make = $conf->data->get('make');
85 # from Parrot::Configure::Messages
46c84060 »
2010-12-30 Implement option of fully silent configuration.
86 ( print_conclusion( $conf, $make, $args ) ) ? exit 0 : exit 1;
3477cc06 »
2008-01-08 Applying patch submitted in
87
88 ################### DOCUMENTATION ###################
89
756762f9 »
2004-01-20 *** empty log message ***
90 =head1 NAME
54d55b6c »
2002-03-16 Patch from Nicholas Clark <nick@unfortu.net>: stops silly people
91
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
92 Configure.pl - Parrot's configuration script
a3cd1626 »
2001-12-30 Build enhancements. Originally to support building shared libraries, …
93
756762f9 »
2004-01-20 *** empty log message ***
94 =head1 SYNOPSIS
a3cd1626 »
2001-12-30 Build enhancements. Originally to support building shared libraries, …
95
756762f9 »
2004-01-20 *** empty log message ***
96 % perl Configure.pl [options]
6d36c2d4 »
2003-10-28 bunch of patches:
97
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
98 or:
99
100 % perl Configure.pl --file=/path/to/configuration/directives
101
756762f9 »
2004-01-20 *** empty log message ***
102 =head1 DESCRIPTION
a3cd1626 »
2001-12-30 Build enhancements. Originally to support building shared libraries, …
103
d10b19ef »
2006-07-17 Perl programs are programs, not scripts
104 This is Parrot's configuration program. It should be run to create
105 the necessary system-specific files before building Parrot.
b4b718e4 »
2004-03-07 Update configuration system documentation (based on patches provided …
106
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
107 We now offer two interfaces to configuration:
108
109 =over 4
110
111 =item * Command-Line Interface
c15d8e54 »
2002-01-08 Added 'reconfig' make target and corresponding --reconfig option to
112
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
113 All configuration options are placed on the command-line. You may request
114 interactive configuration with the C<--ask> option. You may not use the
115 C<--file> option, as that is reserved for the Configuration-File interface.
c15d8e54 »
2002-01-08 Added 'reconfig' make target and corresponding --reconfig option to
116
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
117 =item * Configuration-File Interface
118
119 All configuration options are placed in a special configuration file whose
120 full path is invoked on the command-line as
121 C<--file=/path/to/configuration/directives> as the sole command-line option.
122 You may not request interactive configuration. For specific instructions, see
123 L</"CONFIGURATION-FILE INTERFACE"> below.
124
125 =back
126
127 =head2 General Options
128
129 =over 4
ad4983ce »
2003-01-04 add --optimize Configure option
130
756762f9 »
2004-01-20 *** empty log message ***
131 =item C<--help>
205f6530 »
2001-09-16 Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST c…
132
756762f9 »
2004-01-20 *** empty log message ***
133 Prints out a description of the options and exits.
ad4983ce »
2003-01-04 add --optimize Configure option
134
756762f9 »
2004-01-20 *** empty log message ***
135 =item C<--version>
0fc6ac68 »
2002-05-24 Configure.pl 2.0.
136
756762f9 »
2004-01-20 *** empty log message ***
137 Prints out the version number of Configure.pl and exits.
c0142c7e »
2002-10-05 memory allocation rework
138
756762f9 »
2004-01-20 *** empty log message ***
139 =item C<--verbose>
c0142c7e »
2002-10-05 memory allocation rework
140
6f5b5384 »
2006-01-02 podtidy configure files
141 Tells Configure.pl to output extra information about the configuration data it
142 is setting.
c15d8e54 »
2002-01-08 Added 'reconfig' make target and corresponding --reconfig option to
143
ab81b8c2 »
2004-03-06 Configure output cleanup. Retasks --verbose to include the old output…
144 =item C<--verbose=2>
145
dacbc406 »
2004-04-21 ICU config patch - use systems ICU
146 Tells Configure.pl to output information about i<every> setting added or
ab81b8c2 »
2004-03-06 Configure output cleanup. Retasks --verbose to include the old output…
147 changed.
148
d79c7826 »
2007-08-25 Applying patch submitted in
149 =item C<--verbose-step={N|regex}>
567c2b1b »
2004-04-25 new Configure options: verbose-step
150
d79c7826 »
2007-08-25 Applying patch submitted in
151 Run C<--verbose=2> for step number C<N> or matching description.
567c2b1b »
2004-04-25 new Configure options: verbose-step
152
a5e76432 »
2007-10-20 Committing patch submitted for RT 45523 and 45525. Add --fatal and
153 =item C<--fatal>
154
155 Tells Configure.pl to halt completely if any configuration step fails.
156
157 =item C<--fatal-step={init::alpha,inter::beta,auto::gamma}>
158
159 Tells Configure.pl to halt completely if any configuration step in
160 comma-delimited string individually fails.
161
756762f9 »
2004-01-20 *** empty log message ***
162 =item C<--nomanicheck>
85a1fcca »
2003-09-25 reenable debugging=1 default
163
756762f9 »
2004-01-20 *** empty log message ***
164 Tells Configure.pl not to run the MANIFEST check.
11b744f3 »
2001-09-11 Configure system from Brent Dax <brentdax@cpan.org>
165
20fed4ce »
2004-10-02 Add a --prefix argument to Configure.pl to set the installation prefix
166 =item C<--prefix>
167
168 Sets the location where parrot will be installed.
169
b4b718e4 »
2004-03-07 Update configuration system documentation (based on patches provided …
170 =item C<--ask>
de4d0796 »
2002-05-16 Add conditional configurations for testy code.
171
570f6d47 »
2008-12-17 Remove configuration probe for asynchronous input/output per architec…
172 This turns on the user prompts during configuration. Available only in
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
173 Command-Line interface. Not available in Configuration-File interface.
6fba4381 »
2001-09-22 Abstract the argument and opcode packing types and functions out into
174
84c64a29 »
2007-05-12 Applying to trunk patch submitted in RT 42690. particle requested a '…
175 =item C<--test>
176
177 Run certain tests along with F<Configure.pl>:
178
179 =over 4
180
181 =item C<--test=configure>
182
183 Run tests found in F<t/configure/> I<before> beginning configuration. These
184 tests demonstrate that Parrot's configuration tools will work properly once
185 configuration has begun.
186
187 =item C<--test=build>
188
272ac526 »
2010-01-23 Some prerequisites for successful operation of buildtools_tests are n…
189 Run tests found in F<t/steps/>, F<t/postconfigure/> and F<t/pharness>.
84c64a29 »
2007-05-12 Applying to trunk patch submitted in RT 42690. particle requested a '…
190
191 =item C<--test>
192
193 Run the tests described in C<--test=configure>, conduct configuration, then
194 run the tests described in C<--test=build>.
195
196 =back
197
52494c20 »
2009-07-21 Merge darwin2hints branch into trunk. Functionality for detecting Fin…
198 =item C<--configure_trace>
199
200 Store the results of each configuration step in a Storable F<.sto> file on
201 disk, for later analysis by F<Parrot::Configure::Trace> methods.
202
d3bdc792 »
2010-12-18 Add documentation for quickcover; link to Devel-Cover.
203 =item C<--coveragedir>
204
1bb6425e »
2010-12-31 Changed cover to fullcover and quickcover to cover
205 In preparation for calling C<make cover> to perform coverage analysis,
d3bdc792 »
2010-12-18 Add documentation for quickcover; link to Devel-Cover.
206 provide a user-specified directory for top level of HTML output.
207
52494c20 »
2009-07-21 Merge darwin2hints branch into trunk. Functionality for detecting Fin…
208 =item Operating system-specific configuration options
209
210 =over 4
211
bc26b63e »
2010-02-04 Make the used hints file overridable on the Configure.pl command line.
212 =item C<--hintsfile=filename>
213
214 Use filename as the hints file.
215
52494c20 »
2009-07-21 Merge darwin2hints branch into trunk. Functionality for detecting Fin…
216 =item C<--darwin_no_fink>
217
218 On Darwin, do not probe for Fink libraries.
219
220 =item C<--darwin_no_macports>
221
222 On Darwin, do not probe for Macports libraries.
223
224 =back
225
756762f9 »
2004-01-20 *** empty log message ***
226 =back
a3cd1626 »
2001-12-30 Build enhancements. Originally to support building shared libraries, …
227
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
228 =head2 Compile Options
9d000b4e »
2001-10-12 Made the changes to figure out mask bits for various register and stack
229
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
230 =over 4
19fa0d49 »
2001-10-14 Stop Configure trying to make op_info.c and op.h as op_info.c no longer
231
756762f9 »
2004-01-20 *** empty log message ***
232 =item C<--debugging=0>
bc2ee1df »
2002-03-05 Minor cleanup and enhancements.
233
756762f9 »
2004-01-20 *** empty log message ***
234 Debugging is turned on by default. Use this to disable it.
9d000b4e »
2001-10-12 Made the changes to figure out mask bits for various register and stack
235
82a87188 »
2006-01-05 config: add --parrot_is_shared option to docs
236 =item C<--parrot_is_shared>
237
238 Link parrot dynamically.
239
2ddc05f4 »
2006-07-27 [config] New Configure.pl option --m=32
240 =item C<--m=32>
241
fe05e8a2 »
2006-08-20 Some enhancements on linelength.t
242 Create a 32-bit executable on 64-architectures like x86_64. This
fb5eae84 »
2009-11-08 POD formatting corrections only.
243 option appends C<-m32> to compiler and linker programs and does
244 C<s/lib64/lib/g> on link flags.
2ddc05f4 »
2006-07-27 [config] New Configure.pl option --m=32
245
246 This option is experimental. See F<config/init/defaults.pm> for more.
247
62c60b68 »
2004-03-05 really speed up oo1.pasm by 2
248 =item C<--profile>
249
250 Turn on profiled compile (gcc only for now)
251
efd9dcb6 »
2006-12-19 Added --cage option. Part of patch (#39802) courtesy of Kevin Tew
252 =item C<--cage>
253
254 [CAGE] compile includes many additional warnings
255
756762f9 »
2004-01-20 *** empty log message ***
256 =item C<--optimize>
9d000b4e »
2001-10-12 Made the changes to figure out mask bits for various register and stack
257
fb5eae84 »
2009-11-08 POD formatting corrections only.
258 Add Perl 5's C<$Config{optimize}> to the compiler flags.
2fc8aec2 »
2005-09-14 This patch makes it easier to compile parrot with a compiler other than
259
260 =item C<--optimize=flags>
261
262 Add C<flags> to the compiler flags.
756762f9 »
2004-01-20 *** empty log message ***
263
264 =item C<--inline>
265
266 Tell Configure that the compiler supports C<inline>.
267
268 =item C<--cc=(compiler)>
269
5792dcec »
2011-03-30 Add entry for '--cxx' to help.
270 Specify which C compiler to use.
271
272 =item C<--cxx=(compiler)>
273
274 Specify which C++ compiler to use.
756762f9 »
2004-01-20 *** empty log message ***
275
276 =item C<--ccflags=(flags)>
277
278 Use the given compiler flags.
279
280 =item C<--ccwarn=(flags)>
281
282 Use the given compiler warning flags.
283
284 =item C<--libs=(libs)>
285
286 Use the given libraries.
287
288 =item C<--link=(linker)>
289
290 Specify which linker to use.
291
292 =item C<--linkflags=(flags)>
293
294 Use the given linker flags
295
d716b343 »
2010-10-04 add --ar and --arflags options to Configure.pl
296 =item C<--ar=(archiver)>
297
298 Specify which librarian to use for static libraries
299
300 =item C<--arflags=(flags)>
301
302 Use the given librarian flags for static libraris
303
756762f9 »
2004-01-20 *** empty log message ***
304 =item C<--ld=(linker)>
305
306 Specify which loader to use for shared libraries.
307
308 =item C<--ldflags=(flags)>
309
310 Use the given loader flags for shared libraries
311
110c52f2 »
2009-03-31 [build] Add a --disable-rpath option to allow Linux packagers to build
312 =item C<--disable-rpath>
313
314 Specify that rpath should not be included in linking flags. With this
315 configuration option, you must append the library build directory
316 (usually blib/lib) to the LD_LIBRARY_PATH environment variable (or your
317 platform equivalent). This option is primarily used for building Linux
318 packages.
319
756762f9 »
2004-01-20 *** empty log message ***
320 =item C<--lex=(lexer)>
321
322 Specify which lexer to use.
323
324 =item C<--yacc=(parser)>
325
326 Specify which parser to use.
08462887 »
2004-02-28 various patches 2
327
b4b718e4 »
2004-03-07 Update configuration system documentation (based on patches provided …
328 =item C<--define=val1[,val2]>
329
6f5b5384 »
2006-01-02 podtidy configure files
330 Generate "#define PARROT_DEF_VAL1 1" ... entries in has_header.h. Currently
331 needed to use inet_aton for systems that lack inet_pton:
b4b718e4 »
2004-03-07 Update configuration system documentation (based on patches provided …
332
333 --define=inet_aton
334
a4c21ab8 »
2009-04-30 Applying patch supplied by bsdz in https://trac.parrot.org/parrot/tic…
335 =item C<--no-line-directives>
336
337 Disables the creation of C #line directives when generating C from PMCs and
338 ops. Useful when debugging internals.
3b2baf45 »
2009-05-01 Remove trailing whitespace
339
b4b718e4 »
2004-03-07 Update configuration system documentation (based on patches provided …
340 =back
341
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
342 =head2 Parrot Options
b4b718e4 »
2004-03-07 Update configuration system documentation (based on patches provided …
343
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
344 =over 4
b4b718e4 »
2004-03-07 Update configuration system documentation (based on patches provided …
345
756762f9 »
2004-01-20 *** empty log message ***
346 =item C<--intval=(type)>
347
348 Use the given type for C<INTVAL>.
349
350 =item C<--floatval=(type)>
351
352 Use the given type for C<FLOATVAL>.
353
354 =item C<--opcode=(type)>
355
356 Use the given type for opcodes.
357
358 =item C<--ops=(files)>
359
360 Use the given ops files.
361
5a9e89ce »
2004-04-21 [PATCH] runConfigureICU usage
362 =back
363
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
364 =head2 International Components For Unicode (ICU) Options
5a9e89ce »
2004-04-21 [PATCH] runConfigureICU usage
365
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
366 =over 4
5a9e89ce »
2004-04-21 [PATCH] runConfigureICU usage
367
acf4fa4e »
2004-09-29 autodetect and use system icu installations
368 =item C<--icu-config=/path/to/icu-config>
369
73ba72d1 »
2005-06-01 [perl #36057] [PATCH] Fix some typos - 5
370 Use the specified icu-config script to determine the necessary ICU options.
acf4fa4e »
2004-09-29 autodetect and use system icu installations
371
6f5b5384 »
2006-01-02 podtidy configure files
372 Use --icu-config=none to disable the autodetect feature. Parrot will then be
373 build without ICU.
acf4fa4e »
2004-09-29 autodetect and use system icu installations
374
6f5b5384 »
2006-01-02 podtidy configure files
375 B<Note:> If you specify another ICU option than --icu-config, the autodetection
376 functionality will be disabled.
a1949756 »
2004-09-30 - removed error message if icu-config does not exists
377
dacbc406 »
2004-04-21 ICU config patch - use systems ICU
378 =item C<--icushared=(linkeroption)>
379
5ec035c7 »
2005-12-14 Config cleanup - icu
380 Linker command to link against ICU library.
dacbc406 »
2004-04-21 ICU config patch - use systems ICU
381
382 E.g.
383
384 --icushared='-L /opt/openoffice/program -licudata -licuuc'
385
386 (The libs in openoffice are actually version 2.2 and do not work)
387
388 =item C<--icuheaders=(header_dir)>
389
6f5b5384 »
2006-01-02 podtidy configure files
390 Location of ICU header files without the /unicode suffix.
dacbc406 »
2004-04-21 ICU config patch - use systems ICU
391
392 E.g.
393
394 --icuheaders='/home/lt/icu/'
395
756762f9 »
2004-01-20 *** empty log message ***
396 =back
397
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
398 =head2 Other Options
205f6530 »
2001-09-16 Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST c…
399
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
400 =over 4
a3cd1626 »
2001-12-30 Build enhancements. Originally to support building shared libraries, …
401
b4b718e4 »
2004-03-07 Update configuration system documentation (based on patches provided …
402 =item C<--maintainer>
43a606a2 »
2002-01-30 This patch allows parrot to mostly-build with tcc. It allows one to skip
403
6f5b5384 »
2006-01-02 podtidy configure files
404 Use this option if you want imcc's parser and lexer files to be generated.
405 Needs a working parser and lexer.
9d000b4e »
2001-10-12 Made the changes to figure out mask bits for various register and stack
406
370a4184 »
2011-04-17 Introduce --with-llvm option to explicitly link to LLVM
407 =item C<--with-llvm>
408
409 Use this option if you have a recent version of LLVM installed and wish Parrot
410 to link to it.
411
0fc6ac68 »
2002-05-24 Configure.pl 2.0.
412 =back
a3cd1626 »
2001-12-30 Build enhancements. Originally to support building shared libraries, …
413
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
414 =head1 CONFIGURATION-FILE INTERFACE
415
416 In the Configuration-File interface, unlike the Command-Line interface, you
417 may delete configuration steps or run them in an order different from that
418 listed in Parrot::Configure::Step::List.
419
420 A configuration file is a plain-text file located somewhere in or under your
421 top-level Parrot directory. Unless indicated otherwise, all lines in this
422 file must have no leading whitespace. As in Perl 5, lines beginning with C<#>
423 marks are comments and are ignored during parsing of the file. Unlike Perl 5,
424 you may not begin comments in the middle of a line.
425
426 The configuration file must contain these three sections:
427
428 =over 4
429
430 =item * variables
431
432 =over 4
433
434 =item *
435
436 Section begins with line C<=variables> and must be followed by at least one
437 blank line. All other content in this section is optional.
438
439 =item *
440
441 Section may contain one or more I<key=value> pairs which assign strings to
442 variables much in the way that you would do in a shell script wrapping around
443 F<Configure.pl>.
444
445 =variables
446
447 CC=/usr/bin/gcc
448 CX=/usr/bin/g++
449
450 So if you typically invoked F<Configure.pl> by wrapping it in a shell script
451 for the purpose of setting environmental variables used in options, like this:
452
453 CC="/usr/bin/gcc"
454 CX="/usr/bin/g++"
455 /usr/local/bin/perl Configure.pl \
456 --cc="$CC" \
457 --link="$CX" \
458 --ld="$CX"
459
460 ... you would now place the assignments to C<CC> and C<CX> in the
461 I<=variables> section of the configuration file (as above).
462
463 =back
464
465 =item * general
466
467 =over 4
468
469 =item *
470
471 Section begins with line C<=general> and must be followed by at least one
472 blank line. All other content in this section is optional.
473
474 =item *
475
476 This section is the location recommended for listing options whose impact is
477 not conceptually limited to a single step. It is also the location where the
478 variables defined in the I<=variables> section are assigned to particular
479 Parrot configuration options. Entries in this section must be either
480 I<option=value> pairs or be options which will be assigned a true value.
481
482 cc=$CC
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
067bf3a2 »
2010-12-28 remove init::headers config step
551 ...
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
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 link=$CX
589 ld=/usr/bin/g++
590
591 =steps
592
593 init::manifest nomanicheck
594 init::defaults
595 init::install
596 init::hints verbose-step
597 inter::progs
598 inter::make
599 inter::lex
600 inter::yacc
601 auto::gcc
602 auto::glibc
603 auto::backtrace
604 auto::fink
605 auto::macports
606 auto::msvc
607 auto::attributes
608 auto::warnings
609 init::optimize
610 inter::shlibs
611 inter::libparrot
612 inter::types
613 auto::ops
614 auto::alignptrs
615 auto::headers
616 auto::sizes
617 auto::byteorder
618 auto::va_ptr
619 auto::format
620 auto::isreg
621 auto::arch
622 auto::jit
623 auto::cpu
624 auto::inline
625 auto::gc
626 auto::memalign
627 auto::signal
628 auto::socklen_t
629 auto::env
630 auto::gmp
631 auto::readline
632 auto::pcre
633 auto::opengl
634 auto::gettext
635 auto::snprintf
636 # auto::perldoc
637 auto::ctags
638 auto::revision
639 auto::icu
59fec7a8 »
2011-01-09 Move platform code from config to src
640 auto::platform
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
641 gen::config_h
642 gen::core_pmcs
643 gen::opengl
644 gen::makefiles
645 gen::config_pm
646
647 =cut
648
649 You may see how this works in practice by calling:
650
c2f7ada1 »
2009-08-09 Revise Configure.pl POD and other docs to reflect file movement.
651 perl Configure.pl --file=examples/config/file/configcompiler
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
652
653 or
654
c2f7ada1 »
2009-08-09 Revise Configure.pl POD and other docs to reflect file movement.
655 perl Configure.pl --file=examples/config/file/configwithfatalstep
780cbd77 »
2008-08-29 Merge newsc branch into trunk, implementing Configuration-File interf…
656
c9264be3 »
2004-04-26 more config system add ons and docs
657 =head1 SEE ALSO
658
e478ac72 »
2008-10-26 Merge fileconf branch into trunk per
659 F<lib/Parrot/Configure.pm>,
c9264be3 »
2004-04-26 more config system add ons and docs
660 F<lib/Parrot/Configure/Step.pm>, F<docs/configuration.pod>
661
756762f9 »
2004-01-20 *** empty log message ***
662 =cut
aeeafc53 »
2002-05-27 Mention where all the files went.
663
b91d2687 »
2006-09-18 #40278: [CAGE] perl coding standards coda.
664 # Local Variables:
665 # mode: cperl
666 # cperl-indent-level: 4
667 # fill-column: 100
668 # End:
669 # vim: expandtab shiftwidth=4:
25830bb2 »
2007-05-03 Applying patch submitted in
670
Something went wrong with that request. Please try again.