ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/App-Staticperl/staticperl.pod
(Generate patch)

Comparing App-Staticperl/staticperl.pod (file contents):
Revision 1.22 by root, Mon Dec 13 17:25:17 2010 UTC vs.
Revision 1.25 by root, Tue Dec 21 12:59:29 2010 UTC

147 147
148The command 148The command
149 149
150 staticperl install 150 staticperl install
151 151
152Is normally all you need: It installs the perl interpreter in 152is normally all you need: It installs the perl interpreter in
153F<~/.staticperl/perl>. It downloads, configures, builds and installs the 153F<~/.staticperl/perl>. It downloads, configures, builds and installs the
154perl interpreter if required. 154perl interpreter if required.
155 155
156Most of the following commands simply run one or more steps of this 156Most of the following F<staticperl> subcommands simply run one or more
157sequence. 157steps of this sequence.
158
159If it fails, then most commonly because the compiler options I selected
160are not supported by your compiler - either edit the F<staticperl> script
161yourself or create F<~/.staticperl> shell script where your set working
162C<PERL_CCFLAGS> etc. variables.
158 163
159To force recompilation or reinstallation, you need to run F<staticperl 164To force recompilation or reinstallation, you need to run F<staticperl
160distclean> first. 165distclean> first.
161 166
162=over 4 167=over 4
209 214
210=item F<staticperl clean> 215=item F<staticperl clean>
211 216
212Deletes the perl source directory (and potentially cleans up other 217Deletes the perl source directory (and potentially cleans up other
213intermediate files). This can be used to clean up files only needed for 218intermediate files). This can be used to clean up files only needed for
214building perl, without removing the installed perl interpreter, or to 219building perl, without removing the installed perl interpreter.
215force a re-build from scratch.
216 220
217At the moment, it doesn't delete downloaded tarballs. 221At the moment, it doesn't delete downloaded tarballs.
222
223The exact semantics of this command will probably change.
218 224
219=item F<staticperl distclean> 225=item F<staticperl distclean>
220 226
221This wipes your complete F<~/.staticperl> directory. Be careful with this, 227This wipes your complete F<~/.staticperl> directory. Be careful with this,
222it nukes your perl download, perl sources, perl distribution and any 228it nukes your perl download, perl sources, perl distribution and any
272 -MAnyEvent::Impl::Perl -MAnyEvent::HTTPD -MURI::http 278 -MAnyEvent::Impl::Perl -MAnyEvent::HTTPD -MURI::http
273 279
274 # run it 280 # run it
275 ./app 281 ./app
276 282
283Here are the three phase 2 commands:
284
285=over 4
286
287=item F<staticperl mkbundle> args...
288
289The "default" bundle command - it interprets the given bundle options and
290writes out F<bundle.h>, F<bundle.c>, F<bundle.ccopts> and F<bundle.ldopts>
291files, useful for embedding.
292
293=item F<staticperl mkperl> args...
294
295Creates a bundle just like F<staticperl mkbundle> (in fact, it's the same
296as invoking F<staticperl mkbundle --perl> args...), but then compiles and
297links a new perl interpreter that embeds the created bundle, then deletes
298all intermediate files.
299
300=item F<staticperl mkapp> filename args...
301
302Does the same as F<staticperl mkbundle> (in fact, it's the same as
303invoking F<staticperl mkbundle --app> filename args...), but then compiles
304and links a new standalone application that simply initialises the perl
305interpreter.
306
307The difference to F<staticperl mkperl> is that the standalone application
308does not act like a perl interpreter would - in fact, by default it would
309just do nothing and exit immediately, so you should specify some code to
310be executed via the F<--boot> option.
311
312=back
313
277=head3 OPTION PROCESSING 314=head3 OPTION PROCESSING
278 315
279All options can be given as arguments on the command line (typically 316All options can be given as arguments on the command line (typically
280using long (e.g. C<--verbose>) or short option (e.g. C<-v>) style). Since 317using long (e.g. C<--verbose>) or short option (e.g. C<-v>) style). Since
281specifying a lot of modules can make the command line very cumbersome, 318specifying a lot of modules can make the command line very cumbersome, you
282you can put all long options into a "bundle specification file" (with or 319can put all long options into a "bundle specification file" (one option
283without C<--> prefix) and specify this bundle file instead. 320per line, with or without C<--> prefix) and specify this bundle file
321instead.
284 322
285For example, the command given earlier could also look like this: 323For example, the command given earlier could also look like this:
286 324
287 staticperl mkperl httpd.bundle 325 staticperl mkperl httpd.bundle
288 326
293 use AnyEvent::HTTPD 331 use AnyEvent::HTTPD
294 use URI::http 332 use URI::http
295 add eg/httpd httpd.pm 333 add eg/httpd httpd.pm
296 334
297All options that specify modules or files to be added are processed in the 335All options that specify modules or files to be added are processed in the
298order given on the command line (that affects the C<--use> and C<--eval> 336order given on the command line.
299options at the moment).
300 337
301=head3 PACKAGE SELECTION WORKFLOW 338=head3 PACKAGE SELECTION WORKFLOW
302 339
303F<staticperl mkbundle> has a number of options to control package 340F<staticperl mkbundle> has a number of options to control package
304selection. This section describes how they interact with each other. Also, 341selection. This section describes how they interact with each other. Also,
703 740
704More commonly, you would either activate 64 bit integer support 741More commonly, you would either activate 64 bit integer support
705(C<-Duse64bitint>), or disable large files support (-Uuselargefiles), to 742(C<-Duse64bitint>), or disable large files support (-Uuselargefiles), to
706reduce filesize further. 743reduce filesize further.
707 744
708=item C<PERL_CC>, C<PERL_CPPFLAGS>, C<PERL_OPTIMIZE>, C<PERL_LDFLAGS>, C<PERL_LIBS> 745=item C<PERL_CC>, C<PERL_CCFLAGS>, C<PERL_OPTIMIZE>, C<PERL_LDFLAGS>, C<PERL_LIBS>
709 746
710These flags are passed to perl's F<Configure> script, and are generally 747These flags are passed to perl's F<Configure> script, and are generally
711optimised for small size (at the cost of performance). Since they also 748optimised for small size (at the cost of performance). Since they also
712contain subtle workarounds around various build issues, changing these 749contain subtle workarounds around various build issues, changing these
713usually requires understanding their default values - best look at the top 750usually requires understanding their default values - best look at
714of the F<staticperl> script for more info on these. 751the top of the F<staticperl> script for more info on these, and use a
752F<~/.staticperlrc> to override them.
753
754Most of the variables override (or modify) the corresponding F<Configure>
755variable, except C<PERL_CCFLAGS>, which gets appended.
715 756
716=back 757=back
717 758
718=head4 Variables you probably I<do not want> to override 759=head4 Variables you probably I<do not want> to override
719 760
720=over 4 761=over 4
762
763=item C<MAKE>
764
765The make command to use - default is C<make>.
721 766
722=item C<MKBUNDLE> 767=item C<MKBUNDLE>
723 768
724Where F<staticperl> writes the C<mkbundle> command to 769Where F<staticperl> writes the C<mkbundle> command to
725(default: F<$STATICPERL/mkbundle>). 770(default: F<$STATICPERL/mkbundle>).

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines