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