Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 378 lines (247 sloc) 10.707 kb
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
1 #!/usr/bin/perl -w
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
2 #
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
3 # Configure.pl 2.0
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
4 #
5 # $Id$
6 #
7 # Author: Brent Dax
8 #
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
9
0103c4d @rspier version checks should happen at compile time, so use 'use' instead of 'r...
rspier authored
10 use 5.005_02;
54d55b6 Patch from Nicholas Clark <nick@unfortu.net>: stops silly people
Josh Wilmes authored
11
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
12 use strict;
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
13 use vars qw($parrot_version @parrot_version);
c1dafb2 @rspier Add './lib' to our @INC because Parrot/* moved.
rspier authored
14 use lib 'lib';
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
15
16 use Parrot::BuildUtil;
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
17 use Parrot::Configure::RunSteps;
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
18
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
19 $parrot_version = parrot_version();
20 @parrot_version = parrot_version();
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
21
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
22 # Handle options
c15d8e5 Added 'reconfig' make target and corresponding --reconfig option to
Gregor N. Purdy authored
23
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
24 my %args;
c15d8e5 Added 'reconfig' make target and corresponding --reconfig option to
Gregor N. Purdy authored
25
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
26 for(@ARGV) {
27 my($key, $value)=/--(\w+)(?:=(.*))?/;
1ecca55 @chipdude 2003-03-11 22:06 chip
chipdude authored
28 $key = 'help' unless defined $key;
29 $value = 1 unless defined $value;
ad4983c add --optimize Configure option
Leopold Toetsch authored
30
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
31 for($key) {
32 /version/ && do {
33 my $cvsid='$Id$';
34 print <<"END";
35 Parrot Version $parrot_version Configure 2.0
36 $cvsid
37 END
38 exit;
39 };
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST chec...
brentdax authored
40
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
41 /help/ && do {
42 print <<"EOT";
43 $0 - Parrot Configure 2.0
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
44 General Options:
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
45 --help Show this text
46 --version Show version information
ad4983c add --optimize Configure option
Leopold Toetsch authored
47
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
48 --nomanicheck Don't check the MANIFEST
49 --maintainer Use this option if you are hacking Parrot.
50 This needs working lex/flex/yacc/bison programs.
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
51
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
52 Parrot Configuration Options:
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
53 --ask Have Configure ask for commonly-changed info
eb6a00d @tomhughes Commit patch #17517 from Leopold Toetsch <lt@toetsch.at>.
tomhughes authored
54 you can remove parts of a line with :rem{<opt>}
55 and add options with :add{<opt>} e.g.
56 :rem{-g} :add{-O2}
85a1fcc reenable debugging=1 default
Leopold Toetsch authored
57 --debugging = 0 Disable debugging, default = 1
ad4983c add --optimize Configure option
Leopold Toetsch authored
58 --optimize Optimized compile
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
59 --cc=(compiler) Use the given compiler
60 --ld=(linker) Use the given linker
61 --intval=(type) Use the given type for INTVAL
62 --floatval=(type) Use the given type for FLOATVAL
c0142c7 memory allocation rework
Dan Sugalski authored
63
64 --cgoto=0 Don't build cgoto core - recommended when short of mem
65 --gc=gc|libc|malloc|malloc-trace determine GC type, default = gc
66
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST chec...
brentdax authored
67 EOT
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
68 exit;
69 };
70 $args{$key}=$value;
71 }
c15d8e5 Added 'reconfig' make target and corresponding --reconfig option to
Gregor N. Purdy authored
72 }
73
85a1fcc reenable debugging=1 default
Leopold Toetsch authored
74 $args{debugging} = 1 unless ((exists $args{debugging}) && !$args{debugging});
75
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
76 print <<"END";
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
77 Parrot Version $parrot_version Configure 2.0
df1f57b @chromatic Update copyright text to The Perl Foundation (patch by Josh Wilmes).
chromatic authored
78 Copyright (C) 2001-2003 The Perl Foundation. All Rights Reserved.
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
79
ad4983c add --optimize Configure option
Leopold Toetsch authored
80 Hello, I'm Configure. My job is to poke and prod your system to figure out
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
81 how to build Parrot. The process is completely automated, unless you passed in
82 the `--ask' flag on the command line, in which case it'll prompt you for a few
83 pieces of info.
3ffe560 Figure out byteorder on our own, don't use Perl5 Config's since
Melvin Smith authored
84
ad4983c add --optimize Configure option
Leopold Toetsch authored
85 Since you're running this script, you obviously have Perl 5--I'll be pulling
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
86 some defaults from its configuration.
3ffe560 Figure out byteorder on our own, don't use Perl5 Config's since
Melvin Smith authored
87 END
88
fe31287 This patch adds macros to the config.h file for INTVAL and NUMVAL printf
Dan Sugalski authored
89
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
90 #Run the actual steps
91 Parrot::Configure::RunSteps->runsteps(%args);
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
92
de4d079 Add conditional configurations for testy code.
Melvin Smith authored
93
6fba438 @simoncozens Abstract the argument and opcode packing types and functions out into
simoncozens authored
94 print <<"END";
95
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
96 Okay, we're done!
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
97
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
98 You can now use `make' (or your platform's equivalent to `make') to build your
99 Parrot. After that, you can use `make test' to run the test suite.
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
100
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
101 Happy Hacking,
102 The Parrot Team
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
103
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
104 END
105
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
106 exit(0);
19fa0d4 @tomhughes Stop Configure trying to make op_info.c and op.h as op_info.c no longer
tomhughes authored
107
bc2ee1d @brentdax Minor cleanup and enhancements.
brentdax authored
108
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
109 =head1 TITLE
bc2ee1d @brentdax Minor cleanup and enhancements.
brentdax authored
110
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
111 parrotconfig - Parrot Configure
bc2ee1d @brentdax Minor cleanup and enhancements.
brentdax authored
112
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
113 =head1 NOTE
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
114
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
115 This document is NOT about how to use Configure--it's about Configure's
116 design. For information on using Configure, type C<perl Configure.pl --help>
bd95c7a Reformat POD for improved readability
Simon Glover authored
117 (or your platform's equivalent) at a command line prompt.
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
118
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
119 =head1 DESCRIPTION
bc2ee1d @brentdax Minor cleanup and enhancements.
brentdax authored
120
bd95c7a Reformat POD for improved readability
Simon Glover authored
121 B<I<THIS NEEDS TO BE UPDATED!!!>>
bc2ee1d @brentdax Minor cleanup and enhancements.
brentdax authored
122
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
123 Configure is broken up into I<steps>. Each step contains several related
124 I<prompts>, I<probes>, or I<generations>. Steps should be mostly of a single
125 type, though some overlap is allowed (for example, allowing a probe to ask
bd95c7a Reformat POD for improved readability
Simon Glover authored
126 the user what to do in an exceptional situation).
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
127
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
128 The directory F<config> contains subdirectories for each type of step. Each
129 step should consist of I<exactly one> .pl file and any number of supporting
130 .c, .in, etc. files. Any supporting files should be in a folder whose name
131 is the same as the basename of the step's .pl file; for example, if F<foo.pl>
132 uses F<bar_c.in>, F<bar_c.in> should be in a directory called F<foo>; the
bd95c7a Reformat POD for improved readability
Simon Glover authored
133 full path might be F<config/auto/foo/bar_c.in>.
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
134
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
135 Generally, when adding a new test you should add a new step unless a test
136 I<clearly> belongs in a current step. For example, if we added a new
137 user-configurable type called C<FOOVAL>, you should add the test for its size
138 in F<auto/sizes.pl>; however, if you were testing what dynaloading
bd95c7a Reformat POD for improved readability
Simon Glover authored
139 capabilities are available, you should create a new step.
81226c8 @hotsphink Patch courtesy of Mike Lambert:
hotsphink authored
140
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
141 =head2 Initialization Steps
81226c8 @hotsphink Patch courtesy of Mike Lambert:
hotsphink authored
142
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
143 I<Initialization steps> are run before any other steps. They do tasks such
144 as preparing Configure's data structures and checking the MANIFEST. These
145 will rarely be added; when they are, it usually means that Configure is
146 getting significant new capabilities. They're kept in the directory
bd95c7a Reformat POD for improved readability
Simon Glover authored
147 F<config/init>.
81226c8 @hotsphink Patch courtesy of Mike Lambert:
hotsphink authored
148
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
149 Initialization steps usually do not output anything under normal circumstances.
81226c8 @hotsphink Patch courtesy of Mike Lambert:
hotsphink authored
150
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
151 =head2 Prompts
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
152
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
153 Prompts ask the user for some information. These should be used sparingly.
154 A step containing prompts is an I<interactive step>. Interactive steps
bd95c7a Reformat POD for improved readability
Simon Glover authored
155 should be in the F<config/inter> folder.
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
156
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
157 Interactive steps often include simple probes to determine good guesses of
bd95c7a Reformat POD for improved readability
Simon Glover authored
158 what the user will answer. See L</Prompt or Probe?> for more information.
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
159
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
160 Interactive steps virtually always output something.
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
161
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
162 =head2 Probes
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
163
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
164 Probes are automated tests of some feature of the computer. These should be
165 used wherever a value will not often need to be modified by the user. A step
166 containing probes is an I<automatic step>. Automatic steps should be in the
bd95c7a Reformat POD for improved readability
Simon Glover authored
167 F<config/auto> folder.
083fd66 Nuke all object files in the parrot tree that matter when configuring.
Dan Sugalski authored
168
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
169 Automatic steps usually do not output anything under normal circumstances.
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
170
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
171 =head2 Generations
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
172
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
173 Generations create files needed after Configure has completed, such as
174 Makefiles and configuration headers. A step containing generations is a
bd95c7a Reformat POD for improved readability
Simon Glover authored
175 I<generation step>. Generation steps should be in the F<config/gen> folder.
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
176
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
177 Generation steps usually do not output anything under normal circumstances.
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
178
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
179 =head2 Prompt or Probe?
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
180
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
181 It can sometimes be hard to decide whether a given step should be an
182 automatic or an interactive step. The guiding question is I<Would a user
183 ever want to change this?>, or conversely, I<Is this something that can be
bd95c7a Reformat POD for improved readability
Simon Glover authored
184 completely determined without user intervention?> A step figuring out what
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
185 the compiler's command is would probably be an interactive step; conversely,
186 a step figuring out if that command is connected to a specific compiler
bd95c7a Reformat POD for improved readability
Simon Glover authored
187 (like gcc) would be an automatic step.
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
188
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
189 =head2 Adding Steps
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
190
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
191 New steps should be added in one of the three folders mentioned above. They
bd95c7a Reformat POD for improved readability
Simon Glover authored
192 should include the C<Parrot::Configure::Step> module, described below.
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
193
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
194 All steps are really modules; they should start with a declaration setting
bd95c7a Reformat POD for improved readability
Simon Glover authored
195 the current package to C<Configure::Step>. They should define the following:
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
196
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
197 =over 4
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
198
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
199 =item C<$description>
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
200
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
201 A short descriptive message that should be printed before the step executes.
202 Usually, interactive steps have long, friendly descriptions and other steps
bd95c7a Reformat POD for improved readability
Simon Glover authored
203 have terse descriptions ending in "...".
204
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
205 Some example descriptions:
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
206
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
207 =over 4
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
208
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
209 =item F<inter/progs.pl>
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
210
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
211 Okay, I'm going to start by asking you a couple questions about your
212 compiler and linker. Default values are in square brackets;
213 you can hit ENTER to accept them. If you don't understand a question,
214 the default will usually work--they've been intuited from your Perl 5
215 configuration.
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
216
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
217 =item F<auto/cgoto.pl>
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
218
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
219 Determining if your compiler supports computed goto...
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
220
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
221 =item F<gen/config_h.pl>
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST chec...
brentdax authored
222
bd95c7a Reformat POD for improved readability
Simon Glover authored
223 Generating config.h...
633d178 It adds a prompt to Configure asking for a list of opcode files
Dan Sugalski authored
224
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
225 =back
fd337a3 @brentdax Fixes the + thing in prompts, plus adds a synonym (:add{foo}) and a new ...
brentdax authored
226
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
227 Note that on non-interactive steps, the text C<"done."> will be printed after
228 the description when the step finishes executing; for example, the user will
bd95c7a Reformat POD for improved readability
Simon Glover authored
229 see:
fd337a3 @brentdax Fixes the + thing in prompts, plus adds a synonym (:add{foo}) and a new ...
brentdax authored
230
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
231 Determining if your compiler supports computed goto...done.
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
232
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
233 =item C<@args>
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
234
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
235 This contains the names of any command-line arguments the step cares about.
236 Command-line arguments are standardized in Configure; this will be described
bd95c7a Reformat POD for improved readability
Simon Glover authored
237 later in more detail.
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
238
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
239 =item C<Configure::Step::runstep>
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
240
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
241 This is called to actually execute the step. The command-line arguments that
242 your module said it cared about are passed in; they come in the same order as
bd95c7a Reformat POD for improved readability
Simon Glover authored
243 in C<@args>, and any that weren't specified are passed as C<undef>.
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
244
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
245 =back
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
246
bd95c7a Reformat POD for improved readability
Simon Glover authored
247 Configure won't execute your step by default unless it's specifically told to.
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
248 To do this, edit the C<Parrot::Configure::RunSteps> module's C<@steps> array.
bd95c7a Reformat POD for improved readability
Simon Glover authored
249 Steps are run in the sequence in which they appear in C<@steps>.
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
250
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
251 A template for a new step might look like this:
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
252
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
253 package Configure::Step;
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
254
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
255 use strict;
256 use vars qw($description @args);
257 use Parrot::Configure::Step;
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
258
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
259 $description="<description>";
260 @args=qw(<args>);
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
261
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
262 sub runstep {
263 <code>
264 }
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
265
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
266 =head2 Command-line Arguments
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
267
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
268 Command-line arguments look like C</--\w+(=.*)?/>; the equals sign separates
269 the name and the value. If the value is omitted, it's assumed to be 1. The
270 options "--help" and "--version" are built in to Configure; any others are
bd95c7a Reformat POD for improved readability
Simon Glover authored
271 defined by steps. "--help" lists some common options.
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
272
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
273 Steps use the C<@args> array to list any options they're interested in. They
bd95c7a Reformat POD for improved readability
Simon Glover authored
274 should be listed without the dashes.
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
275
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
276 =head2 Building Up Configuration Data
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
277
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
278 The second step is F<config/init/data.pl>, which sets up a C<Configure::Data>
279 package. You get and set Configure's data by calling methods on this
bd95c7a Reformat POD for improved readability
Simon Glover authored
280 package. The methods are listed below.
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
281
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
282 =over 4
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST chec...
brentdax authored
283
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
284 =item C<< Configure::Data->get(keys) >>
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
285
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
286 Returns the values for the given keys.
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
287
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
288 =item C<< Configure::Data->set(key, value, key, value, ...) >>
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST chec...
brentdax authored
289
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
290 Sets the given keys to the given values.
59345b3 @brentdax Fix issues with ivsize and nvsize
brentdax authored
291
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
292 =item C<< Configure::Data->keys() >>
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST chec...
brentdax authored
293
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
294 Returns a list of all keys.
59345b3 @brentdax Fix issues with ivsize and nvsize
brentdax authored
295
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
296 =item C<< Configure::Data->dump() >>
59345b3 @brentdax Fix issues with ivsize and nvsize
brentdax authored
297
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
298 Returns a string that can be C<eval>ed by Perl to create a hash representing
bd95c7a Reformat POD for improved readability
Simon Glover authored
299 Configure's data.
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST chec...
brentdax authored
300
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
301 =back
5cac2b3 @brentdax Cleaner VMS support, more info for Parrot::Config to remember, more flex...
brentdax authored
302
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
303 =head2 C<Parrot::Configure::Step>
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
304
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
305 The C<Parrot::Configure::Step> module contains utility functions for steps to
bd95c7a Reformat POD for improved readability
Simon Glover authored
306 use. They include the following:
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
307
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
308 =over 4
43a606a This patch allows parrot to mostly-build with tcc. It allows one to ski...
Dan Sugalski authored
309
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
310 =item C<prompt(message, default)>
43a606a This patch allows parrot to mostly-build with tcc. It allows one to ski...
Dan Sugalski authored
311
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
312 Prints out "message [default] " and waits for the user's response. Returns
bd95c7a Reformat POD for improved readability
Simon Glover authored
313 the response, or the default if the user just hit ENTER.
5cac2b3 @brentdax Cleaner VMS support, more info for Parrot::Config to remember, more flex...
brentdax authored
314
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
315 =item C<cc_gen(file)>
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
316
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
317 Calls C<genfile(file, 'test.c')>.
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
318
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
319 =item C<cc_build()>
43a606a This patch allows parrot to mostly-build with tcc. It allows one to ski...
Dan Sugalski authored
320
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
321 Calls the compiler and linker on F<test.c>.
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
322
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
323 =item C<cc_run()>
43a606a This patch allows parrot to mostly-build with tcc. It allows one to ski...
Dan Sugalski authored
324
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
325 Calls the F<test> (or F<test.exe>) executable.
43a606a This patch allows parrot to mostly-build with tcc. It allows one to ski...
Dan Sugalski authored
326
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
327 =item C<cc_clean()>
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
328
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
329 Cleans up all files in the root folder that match the glob I<test.*>.
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
330
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
331 =item C<genfile(infile, outfile)>
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
332
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
333 Takes the given I<infile>, substitutes any sequences matching C</\$\{\w+\}/>
334 for the given key's value in Configure's data, and writes the results to
bd95c7a Reformat POD for improved readability
Simon Glover authored
335 I<outfile>.
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
336
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
337 =back
a3cd162 Build enhancements. Originally to support building shared libraries, but...
Gregor N. Purdy authored
338
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
339 =head1 MISCELLANEOUS
340
341 =head2 Moved Files
342
343 Several files have been moved from their original locations to new ones.
344
345 =over 4
346
347 =item F<*/Makefile.in>
348
349 Moved to F<config/gen/makefiles> and renamed appropriately.
350
351 =item F<config_h.in>
352
353 Moved to F<config/gen/config_h>.
354
355 =item F<Config_pm.in>
356
357 moved to F<config/gen/config_pm>.
358
359 =item F<Types_pm.in>
360
361 Deleted; F<lib/Parrot/Types.pm> now doesn't need to be generated.
362
363 =item F<hints/*>
364
365 Moved to F<config/init/hints> and rewritten.
366
367 =item F<platforms/*>
368
369 Moved to F<config/gen/platform>.
370
371 =item F<test*.c>, F<test*_c.in>
372
373 Moved to various subdirectories of F<hints/auto>.
374
375 =back
376
69a9982 @hotsphink Missing bits of the --debugging flag patch (I left it out of my
hotsphink authored
377 =cut
Something went wrong with that request. Please try again.