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