Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 532 lines (330 sloc) 14.155 kb
0d2ceef standardize bang perl
Michael Scott authored
1 #! perl -w
b6d9f55 copyright
Michael Scott authored
2 # Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
3 # $Id$
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
4
756762f *** empty log message ***
Michael Scott authored
5 =head1 NAME
54d55b6 Patch from Nicholas Clark <nick@unfortu.net>: stops silly people
Josh Wilmes authored
6
756762f *** empty log message ***
Michael Scott authored
7 Configure.pl - Parrot Configure
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
8
756762f *** empty log message ***
Michael Scott authored
9 =head1 SYNOPSIS
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
10
756762f *** empty log message ***
Michael Scott authored
11 % perl Configure.pl [options]
6d36c2d bunch of patches:
Leopold Toetsch authored
12
756762f *** empty log message ***
Michael Scott authored
13 =head1 DESCRIPTION
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
14
756762f *** empty log message ***
Michael Scott authored
15 This is Parrot's configuration script.
c15d8e5 Added 'reconfig' make target and corresponding --reconfig option to
Gregor N. Purdy authored
16
756762f *** empty log message ***
Michael Scott authored
17 =head3 General Options
c15d8e5 Added 'reconfig' make target and corresponding --reconfig option to
Gregor N. Purdy authored
18
756762f *** empty log message ***
Michael Scott authored
19 =over
ad4983c add --optimize Configure option
Leopold Toetsch authored
20
756762f *** empty log message ***
Michael Scott authored
21 =item C<--help>
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST c…
brentdax authored
22
756762f *** empty log message ***
Michael Scott authored
23 Prints out a description of the options and exits.
ad4983c add --optimize Configure option
Leopold Toetsch authored
24
756762f *** empty log message ***
Michael Scott authored
25 =item C<--version>
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
26
756762f *** empty log message ***
Michael Scott authored
27 Prints out the version number of Configure.pl and exits.
c0142c7 memory allocation rework
Dan Sugalski authored
28
756762f *** empty log message ***
Michael Scott authored
29 =item C<--verbose>
c0142c7 memory allocation rework
Dan Sugalski authored
30
756762f *** empty log message ***
Michael Scott authored
31 Tells Configure.pl to output extra information about the configuration
32 data it is setting.
c15d8e5 Added 'reconfig' make target and corresponding --reconfig option to
Gregor N. Purdy authored
33
756762f *** empty log message ***
Michael Scott authored
34 =item C<--nomanicheck>
85a1fcc reenable debugging=1 default
Leopold Toetsch authored
35
756762f *** empty log message ***
Michael Scott authored
36 Tells Configure.pl not to run the MANIFEST check.
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
37
756762f *** empty log message ***
Michael Scott authored
38 =item C<--maintainer>
3ffe560 Figure out byteorder on our own, don't use Perl5 Config's since
Melvin Smith authored
39
756762f *** empty log message ***
Michael Scott authored
40 Use this option if you want imcc's parser and lexer files to be
41 generated. Needs a working parser and lexer.
3ffe560 Figure out byteorder on our own, don't use Perl5 Config's since
Melvin Smith authored
42
756762f *** empty log message ***
Michael Scott authored
43 =item C<--miniparrot>
fe31287 This patch adds macros to the config.h file for INTVAL and NUMVAL printf
Dan Sugalski authored
44
756762f *** empty log message ***
Michael Scott authored
45 Build parrot assuming only pure ANSI C is available.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
46
756762f *** empty log message ***
Michael Scott authored
47 =item C<--buildicu>
de4d079 Add conditional configurations for testy code.
Melvin Smith authored
48
756762f *** empty log message ***
Michael Scott authored
49 Build Parrot and ICU. Runs F<icu/source/configure> with the options in
50 F<icu/README.parrot>.
6fba438 @simoncozens Abstract the argument and opcode packing types and functions out into
simoncozens authored
51
756762f *** empty log message ***
Michael Scott authored
52 =back
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
53
756762f *** empty log message ***
Michael Scott authored
54 =head3 Parrot Configuration Options
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
55
da70a71 Hyperlinks for F<path/file> and C<Perl::Module>, plus tidy up C<< >>…
Michael Scott authored
56 You can add and remove option values with C<< :rem{<opt>} >> and
57 C<< :add{<opt>} >>. For example:
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
58
756762f *** empty log message ***
Michael Scott authored
59 perl Configure.pl --ccflags="rem{-g} :add{-O2}"
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
60
756762f *** empty log message ***
Michael Scott authored
61 =over
19fa0d4 @tomhughes Stop Configure trying to make op_info.c and op.h as op_info.c no longer
tomhughes authored
62
756762f *** empty log message ***
Michael Scott authored
63 =item C<--ask>
bc2ee1d @brentdax Minor cleanup and enhancements.
brentdax authored
64
756762f *** empty log message ***
Michael Scott authored
65 This turns on the user prompts.
bc2ee1d @brentdax Minor cleanup and enhancements.
brentdax authored
66
756762f *** empty log message ***
Michael Scott authored
67 =item C<--debugging=0>
bc2ee1d @brentdax Minor cleanup and enhancements.
brentdax authored
68
756762f *** empty log message ***
Michael Scott authored
69 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
70
62c60b6 really speed up oo1.pasm by 2
Leopold Toetsch authored
71 =item C<--profile>
72
73 Turn on profiled compile (gcc only for now)
74
75 Tell the compiler to do an optimization phase.
76
756762f *** empty log message ***
Michael Scott authored
77 =item C<--optimize>
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
78
756762f *** empty log message ***
Michael Scott authored
79 Tell the compiler to do an optimization phase.
80
81 =item C<--inline>
82
83 Tell Configure that the compiler supports C<inline>.
84
85 =item C<--expnetwork>
86
87 Enable experimental networking. This is an unused option and should
88 probably be removed.
0846288 various patches 2
Leopold Toetsch authored
89
756762f *** empty log message ***
Michael Scott authored
90 =item C<--cc=(compiler)>
91
92 Specify which compiler to use.
93
94 =item C<--ccflags=(flags)>
95
96 Use the given compiler flags.
97
98 =item C<--ccwarn=(flags)>
99
100 Use the given compiler warning flags.
101
102 =item C<--libs=(libs)>
103
104 Use the given libraries.
105
106 =item C<--link=(linker)>
107
108 Specify which linker to use.
109
110 =item C<--linkflags=(flags)>
111
112 Use the given linker flags
113
114 =item C<--ld=(linker)>
115
116 Specify which loader to use for shared libraries.
117
118 =item C<--ldflags=(flags)>
119
120 Use the given loader flags for shared libraries
121
122 =item C<--lex=(lexer)>
123
124 Specify which lexer to use.
125
126 =item C<--yacc=(parser)>
127
128 Specify which parser to use.
0846288 various patches 2
Leopold Toetsch authored
129
756762f *** empty log message ***
Michael Scott authored
130 =item C<--intval=(type)>
131
132 Use the given type for C<INTVAL>.
133
134 =item C<--floatval=(type)>
135
136 Use the given type for C<FLOATVAL>.
137
138 =item C<--opcode=(type)>
139
140 Use the given type for opcodes.
141
142 =item C<--ops=(files)>
143
144 Use the given ops files.
145
146 =item C<--pmc=(files)>
bc2ee1d @brentdax Minor cleanup and enhancements.
brentdax authored
147
756762f *** empty log message ***
Michael Scott authored
148 Use the given PMC files.
149
150 =item C<--cgoto=0>
151
152 Don't build cgoto core. This is recommended when you are short of memory.
153
154 =item C<--jitcapable>
155
156 Use JIT system.
157
158 =item C<--execcapable>
159
0846288 various patches 2
Leopold Toetsch authored
160 Use JIT to emit a native executable.
756762f *** empty log message ***
Michael Scott authored
161
162 =item C<--gc=(type)>
163
164 Determine the type of garbage collection. The value for C<type> should
165 be one of: C<gc>, C<libc>, C<malloc> or C<malloc-trace>. The default is
166 C<gc>.
167
0846288 various patches 2
Leopold Toetsch authored
168 =item C<--define=val1[,val2]>
169
170 Generate "#define PARROT_DEF_VAL1 1" ... entries in has_header.h.
171 Currently needed to use inet_aton for systems that lack inet_pton:
172
173 --define=inet_aton
174
756762f *** empty log message ***
Michael Scott authored
175 =back
176
177 =head2 Parrot Configuration System
bc2ee1d @brentdax Minor cleanup and enhancements.
brentdax authored
178
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
179 Configure is broken up into I<steps>. Each step contains several related
180 I<prompts>, I<probes>, or I<generations>. Steps should be mostly of a single
181 type, though some overlap is allowed (for example, allowing a probe to ask
bd95c7a Reformat POD for improved readability
Simon Glover authored
182 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
183
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
184 The directory F<config> contains subdirectories for each type of step. Each
185 step should consist of I<exactly one> .pl file and any number of supporting
186 .c, .in, etc. files. Any supporting files should be in a folder whose name
187 is the same as the basename of the step's .pl file; for example, if F<foo.pl>
188 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
189 full path might be F<config/auto/foo/bar_c.in>.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
190
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
191 Generally, when adding a new test you should add a new step unless a test
192 I<clearly> belongs in a current step. For example, if we added a new
193 user-configurable type called C<FOOVAL>, you should add the test for its size
194 in F<auto/sizes.pl>; however, if you were testing what dynaloading
bd95c7a Reformat POD for improved readability
Simon Glover authored
195 capabilities are available, you should create a new step.
81226c8 @hotsphink Patch courtesy of Mike Lambert:
hotsphink authored
196
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
197 =head2 Initialization Steps
81226c8 @hotsphink Patch courtesy of Mike Lambert:
hotsphink authored
198
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
199 I<Initialization steps> are run before any other steps. They do tasks such
200 as preparing Configure's data structures and checking the MANIFEST. These
201 will rarely be added; when they are, it usually means that Configure is
202 getting significant new capabilities. They're kept in the directory
bd95c7a Reformat POD for improved readability
Simon Glover authored
203 F<config/init>.
81226c8 @hotsphink Patch courtesy of Mike Lambert:
hotsphink authored
204
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
205 Initialization steps usually do not output anything under normal circumstances.
81226c8 @hotsphink Patch courtesy of Mike Lambert:
hotsphink authored
206
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
207 =head2 Prompts
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
208
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
209 Prompts ask the user for some information. These should be used sparingly.
210 A step containing prompts is an I<interactive step>. Interactive steps
bd95c7a Reformat POD for improved readability
Simon Glover authored
211 should be in the F<config/inter> folder.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
212
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
213 Interactive steps often include simple probes to determine good guesses of
bd95c7a Reformat POD for improved readability
Simon Glover authored
214 what the user will answer. See L</Prompt or Probe?> for more information.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
215
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
216 Interactive steps virtually always output something.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
217
756762f *** empty log message ***
Michael Scott authored
218 Note that, by default, these prompts are turned off. To enable them run Configure with the "--ask" option.
219
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
220 =head2 Probes
9d000b4 Made the changes to figure out mask bits for various register and stack
Dan Sugalski authored
221
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
222 Probes are automated tests of some feature of the computer. These should be
223 used wherever a value will not often need to be modified by the user. A step
224 containing probes is an I<automatic step>. Automatic steps should be in the
bd95c7a Reformat POD for improved readability
Simon Glover authored
225 F<config/auto> folder.
083fd66 Nuke all object files in the parrot tree that matter when configuring.
Dan Sugalski authored
226
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
227 Automatic steps usually do not output anything under normal circumstances.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
228
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
229 =head2 Generations
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
230
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
231 Generations create files needed after Configure has completed, such as
232 Makefiles and configuration headers. A step containing generations is a
bd95c7a Reformat POD for improved readability
Simon Glover authored
233 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
234
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
235 Generation steps usually do not output anything under normal circumstances.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
236
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
237 =head2 Prompt or Probe?
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
238
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
239 It can sometimes be hard to decide whether a given step should be an
240 automatic or an interactive step. The guiding question is I<Would a user
241 ever want to change this?>, or conversely, I<Is this something that can be
bd95c7a Reformat POD for improved readability
Simon Glover authored
242 completely determined without user intervention?> A step figuring out what
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
243 the compiler's command is would probably be an interactive step; conversely,
244 a step figuring out if that command is connected to a specific compiler
bd95c7a Reformat POD for improved readability
Simon Glover authored
245 (like gcc) would be an automatic step.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
246
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
247 =head2 Adding Steps
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
248
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
249 New steps should be added in one of the three folders mentioned above. They
bd95c7a Reformat POD for improved readability
Simon Glover authored
250 should include the C<Parrot::Configure::Step> module, described below.
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
251
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
252 All steps are really modules; they should start with a declaration setting
bd95c7a Reformat POD for improved readability
Simon Glover authored
253 the current package to C<Configure::Step>. They should define the following:
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
254
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
255 =over 4
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
256
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
257 =item C<$description>
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
258
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
259 A short descriptive message that should be printed before the step executes.
260 Usually, interactive steps have long, friendly descriptions and other steps
bd95c7a Reformat POD for improved readability
Simon Glover authored
261 have terse descriptions ending in "...".
262
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
263 Some example descriptions:
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
264
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
265 =over 4
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
266
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
267 =item F<inter/progs.pl>
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
268
756762f *** empty log message ***
Michael Scott authored
269 Okay, I'm going to start by asking you a couple questions about your
270 compiler and linker. Default values are in square brackets;
271 you can hit ENTER to accept them. If you don't understand a question,
272 the default will usually work--they've been intuited from your Perl 5
273 configuration.
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
274
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
275 =item F<auto/cgoto.pl>
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
276
756762f *** empty log message ***
Michael Scott authored
277 Determining if your compiler supports computed goto...
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
278
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
279 =item F<gen/config_h.pl>
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST c…
brentdax authored
280
756762f *** empty log message ***
Michael Scott authored
281 Generating config.h...
633d178 It adds a prompt to Configure asking for a list of opcode files
Dan Sugalski authored
282
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
283 =back
fd337a3 @brentdax Fixes the + thing in prompts, plus adds a synonym (:add{foo}) and a n…
brentdax authored
284
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
285 Note that on non-interactive steps, the text C<"done."> will be printed after
286 the description when the step finishes executing; for example, the user will
bd95c7a Reformat POD for improved readability
Simon Glover authored
287 see:
fd337a3 @brentdax Fixes the + thing in prompts, plus adds a synonym (:add{foo}) and a n…
brentdax authored
288
756762f *** empty log message ***
Michael Scott authored
289 Determining if your compiler supports computed goto...done.
11b744f @simoncozens Configure system from Brent Dax <brentdax@cpan.org>
simoncozens authored
290
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
291 =item C<@args>
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
292
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
293 This contains the names of any command-line arguments the step cares about.
294 Command-line arguments are standardized in Configure; this will be described
bd95c7a Reformat POD for improved readability
Simon Glover authored
295 later in more detail.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
296
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
297 =item C<Configure::Step::runstep>
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
298
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
299 This is called to actually execute the step. The command-line arguments that
300 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
301 in C<@args>, and any that weren't specified are passed as C<undef>.
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
302
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
303 =back
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
304
bd95c7a Reformat POD for improved readability
Simon Glover authored
305 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
306 To do this, edit the C<Parrot::Configure::RunSteps> module's C<@steps> array.
bd95c7a Reformat POD for improved readability
Simon Glover authored
307 Steps are run in the sequence in which they appear in C<@steps>.
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
308
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
309 A template for a new step might look like this:
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
310
756762f *** empty log message ***
Michael Scott authored
311 package Configure::Step;
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
312
756762f *** empty log message ***
Michael Scott authored
313 use strict;
314 use vars qw($description @args);
315 use Parrot::Configure::Step;
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
316
756762f *** empty log message ***
Michael Scott authored
317 $description="<description>";
318 @args=qw(<args>);
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
319
756762f *** empty log message ***
Michael Scott authored
320 sub runstep {
321 <code>
322 }
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
323
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
324 =head2 Command-line Arguments
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
325
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
326 Command-line arguments look like C</--\w+(=.*)?/>; the equals sign separates
327 the name and the value. If the value is omitted, it's assumed to be 1. The
756762f *** empty log message ***
Michael Scott authored
328 options C<--help> and C<--version> are built in to Configure; any others are
329 defined by steps.
330
331 If you add a new option, don't forget to add it to this documentation and the "--help" listing in F<Configure.pl>.
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
332
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
333 Steps use the C<@args> array to list any options they're interested in. They
bd95c7a Reformat POD for improved readability
Simon Glover authored
334 should be listed without the dashes.
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
335
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
336 =head2 Building Up Configuration Data
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
337
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
338 The second step is F<config/init/data.pl>, which sets up a C<Configure::Data>
339 package. You get and set Configure's data by calling methods on this
bd95c7a Reformat POD for improved readability
Simon Glover authored
340 package. The methods are listed below.
1d93957 @simoncozens Configure now generates Makefile
simoncozens authored
341
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
342 =over 4
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST c…
brentdax authored
343
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
344 =item C<< Configure::Data->get(keys) >>
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
345
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
346 Returns the values for the given keys.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
347
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
348 =item C<< Configure::Data->set(key, value, key, value, ...) >>
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST c…
brentdax authored
349
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
350 Sets the given keys to the given values.
59345b3 @brentdax Fix issues with ivsize and nvsize
brentdax authored
351
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
352 =item C<< Configure::Data->keys() >>
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST c…
brentdax authored
353
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
354 Returns a list of all keys.
59345b3 @brentdax Fix issues with ivsize and nvsize
brentdax authored
355
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
356 =item C<< Configure::Data->dump() >>
59345b3 @brentdax Fix issues with ivsize and nvsize
brentdax authored
357
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
358 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
359 Configure's data.
205f653 @brentdax Win32 compatibility, Configure hints, 5.005 compatibility, MANIFEST c…
brentdax authored
360
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
361 =back
5cac2b3 @brentdax Cleaner VMS support, more info for Parrot::Config to remember, more f…
brentdax authored
362
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
363 =head2 C<Parrot::Configure::Step>
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
364
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
365 The C<Parrot::Configure::Step> module contains utility functions for steps to
bd95c7a Reformat POD for improved readability
Simon Glover authored
366 use. They include the following:
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
367
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
368 =over 4
43a606a This patch allows parrot to mostly-build with tcc. It allows one to …
Dan Sugalski authored
369
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
370 =item C<prompt(message, default)>
43a606a This patch allows parrot to mostly-build with tcc. It allows one to …
Dan Sugalski authored
371
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
372 Prints out "message [default] " and waits for the user's response. Returns
bd95c7a Reformat POD for improved readability
Simon Glover authored
373 the response, or the default if the user just hit ENTER.
5cac2b3 @brentdax Cleaner VMS support, more info for Parrot::Config to remember, more f…
brentdax authored
374
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
375 =item C<cc_gen(file)>
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
376
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
377 Calls C<genfile(file, 'test.c')>.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
378
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
379 =item C<cc_build()>
43a606a This patch allows parrot to mostly-build with tcc. It allows one to …
Dan Sugalski authored
380
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
381 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
382
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
383 =item C<cc_run()>
43a606a This patch allows parrot to mostly-build with tcc. It allows one to …
Dan Sugalski authored
384
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
385 Calls the F<test> (or F<test.exe>) executable.
43a606a This patch allows parrot to mostly-build with tcc. It allows one to …
Dan Sugalski authored
386
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
387 =item C<cc_clean()>
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
388
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
389 Cleans up all files in the root folder that match the glob I<test.*>.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
390
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
391 =item C<genfile(infile, outfile)>
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
392
764e175 add --maintainer option to Configure to work around imcc dependencies
Leopold Toetsch authored
393 Takes the given I<infile>, substitutes any sequences matching C</\$\{\w+\}/>
394 for the given key's value in Configure's data, and writes the results to
bd95c7a Reformat POD for improved readability
Simon Glover authored
395 I<outfile>.
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
396
0fc6ac6 @brentdax Configure.pl 2.0.
brentdax authored
397 =back
a3cd162 Build enhancements. Originally to support building shared libraries, …
Gregor N. Purdy authored
398
756762f *** empty log message ***
Michael Scott authored
399 =head1 AUTHOR
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
400
756762f *** empty log message ***
Michael Scott authored
401 Brent Dax
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
402
756762f *** empty log message ***
Michael Scott authored
403 =cut
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
404
756762f *** empty log message ***
Michael Scott authored
405 use 5.005_02;
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
406
756762f *** empty log message ***
Michael Scott authored
407 use strict;
408 use vars qw($parrot_version @parrot_version);
409 use lib 'lib';
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
410
756762f *** empty log message ***
Michael Scott authored
411 use Parrot::BuildUtil;
412 use Parrot::Configure::RunSteps;
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
413
756762f *** empty log message ***
Michael Scott authored
414 $| = 1;
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
415
756762f *** empty log message ***
Michael Scott authored
416 $parrot_version = parrot_version();
417 @parrot_version = parrot_version();
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
418
756762f *** empty log message ***
Michael Scott authored
419 # Handle options
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
420
756762f *** empty log message ***
Michael Scott authored
421 my %args;
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
422
756762f *** empty log message ***
Michael Scott authored
423 for(@ARGV) {
424 my($key, $value)=/--(\w+)(?:=(.*))?/;
425 $key = 'help' unless defined $key;
426 $value = 1 unless defined $value;
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
427
756762f *** empty log message ***
Michael Scott authored
428 for($key) {
429 /version/ && do {
430 my $cvsid='$Id$';
431 print <<"END";
432 Parrot Version $parrot_version Configure 2.0
433 $cvsid
434 END
435 exit;
436 };
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
437
756762f *** empty log message ***
Michael Scott authored
438 /help/ && do {
439 print <<"EOT";
440 $0 - Parrot Configure 2.0
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
441
756762f *** empty log message ***
Michael Scott authored
442 General Options:
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
443
756762f *** empty log message ***
Michael Scott authored
444 --help Show this text
445 --version Show version information
446 --verbose Output extra information
447 --nomanicheck Don't check the MANIFEST
448 --maintainer Create imcc's parser and lexer files. Needs a working
449 parser and lexer.
450 --miniparrot Build parrot assuming only pure ANSI C is available
451 --buildicu Build Parrot and ICU
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
452
756762f *** empty log message ***
Michael Scott authored
453 Parrot Configuration Options:
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
454
756762f *** empty log message ***
Michael Scott authored
455 You can add and remove option values with :rem{<opt>} and :add{<opt>}
456 e.g. : --ccflags="rem{-g} :add{-O2}"
457
458 --ask Have Configure ask for commonly-changed info
459 --debugging=0 Disable debugging, default = 1
460 --optimize Optimized compile
461 --inline Compiler supports inline
462 --expnetwork Enable experimental networking (unused)
0846288 various patches 2
Leopold Toetsch authored
463
756762f *** empty log message ***
Michael Scott authored
464 --cc=(compiler) Use the given compiler
465 --ccflags=(flags) Use the given compiler flags
466 --ccwarn=(flags) Use the given compiler warning flags
467 --libs=(libs) Use the given libraries
468 --link=(linker) Use the given linker
469 --linkflags=(flags) Use the given linker flags
470 --ld=(linker) Use the given loader for shared libraries
471 --ldflags=(flags) Use the given loader flags for shared libraries
472 --lex=(lexer) Use the given lexical analyzer generator
473 --yacc=(parser) Use the given parser generator
0846288 various patches 2
Leopold Toetsch authored
474
756762f *** empty log message ***
Michael Scott authored
475 --intval=(type) Use the given type for INTVAL
476 --floatval=(type) Use the given type for FLOATVAL
477 --opcode=(type) Use the given type for opcodes
478 --ops=(files) Use the given ops files
479 --pmc=(files) Use the given PMC files
480
481 --cgoto=0 Don't build cgoto core - recommended when short of mem
0846288 various patches 2
Leopold Toetsch authored
482 --jitcapable Use JIT
483 --execcapable Use JIT to emit a native executable
756762f *** empty log message ***
Michael Scott authored
484 --gc=(type) Determine the type of garbage collection
485 type=(gc|libc|malloc|malloc-trace) default is gc
486
0846288 various patches 2
Leopold Toetsch authored
487 --define=inet_aton Quick hack to use inet_aton instead of inet_pton
488
756762f *** empty log message ***
Michael Scott authored
489 EOT
490 exit;
491 };
492 $args{$key}=$value;
493 }
494 }
495
496 $args{debugging} = 1 unless ((exists $args{debugging}) && !$args{debugging});
497
498 print <<"END";
499 Parrot Version $parrot_version Configure 2.0
500 Copyright (C) 2001-2003 The Perl Foundation. All Rights Reserved.
501
502 Hello, I'm Configure. My job is to poke and prod your system to figure out
503 how to build Parrot. The process is completely automated, unless you passed in
504 the `--ask' flag on the command line, in which case it'll prompt you for a few
505 pieces of info.
506
507 Since you're running this script, you obviously have Perl 5--I'll be pulling
508 some defaults from its configuration.
509 END
510
511
512 #Run the actual steps
513 Parrot::Configure::RunSteps->runsteps(%args);
514
515
0846288 various patches 2
Leopold Toetsch authored
516
756762f *** empty log message ***
Michael Scott authored
517 print <<"END";
518
519 Okay, we're done!
520
521 You can now use `make' (or your platform's equivalent to `make') to build your
522 Parrot. After that, you can use `make test' to run the test suite.
523
524 Happy Hacking,
525 The Parrot Team
526
527 END
528
529 exit(0);
aeeafc5 @brentdax Mention where all the files went.
brentdax authored
530
531
Something went wrong with that request. Please try again.