Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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