Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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