Skip to content

Commit

Permalink
Added documentation on install
Browse files Browse the repository at this point in the history
  • Loading branch information
Leont committed May 25, 2010
1 parent 2a09783 commit 71944f8
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 4 deletions.
84 changes: 84 additions & 0 deletions doc/Install.pod
@@ -0,0 +1,84 @@
=pod

=head1 NAME

libperl++ - Install

=head1 VERSION

XXX
=head1 SYNOPSIS

perl Build.PL
./Build
./Build test
./Build install

=head1 BEFORE YOU START

libperl++ requires a number of things to build it

=over 4

=item * perl 5.8 or higher. perl 5.10 or higher is recommended.

=item * A recent C++ compiler. Currently supported are

=over 2

=item * GCC 4.4 or higher

=item * MS Visual C++ 2010

=back

Recent version of the Intel and Codeweavers compilers may work, but have not been tested in any way.

=item * The Boost libraries. Note that this only includes headers, not runtime libraries.

=back

=head1 BUILDING

libperl++'s build process is Build.PL compatible. All actions take options in the form C<options=value>, though if no value is given 1 is assumed.

=head2 Creating the Build executable

The Build executable can be generated by issuing

perl Build.PL

Any options given to it will be saved and passed on to all subsequent calls of Build. Most options for Build actions are specific for that action, except C<silent>, which is used by almost all Build actions. The default is 0.

=head2 Building the library

./Build

it does not take any specific options.

=head2 Running tests

./Build test

The amount of information given depends on the value of C<silent>. It can take values from -1 to 3, from printing out individual tests to printing out nothing.

=head2 Installing the library

./Build install

Install can take a number of options

=over 4

=item * libdir: the location where the libperl++ library will be installed. The default is installation dependent.

=item * incdir: the location where libperl++ headers will be installed. The default is installation dependent.

=item * moddir: the location there helper modules will be installed. The default is installation dependent.

=item * dry_run: if this is true it will print out what it was planning to do without actually doing it. Defaults to false.

=back

=cut

3 changes: 3 additions & 0 deletions doc/Tutorial.pod
Expand Up @@ -12,10 +12,13 @@ XXX

Currently the recommended way to get libperl++ is to checkout the latest version from git at L<git://github.com/Leont/libperl--.git>. Releases are currently not made but will be made in the future. It can be installed using by issuing:

perl Build.PL
./Build
./Build test
./Build install

For more information, see L<Install>.

=head1 GETTING STARTED

libperl++ is a library for embedding perl. In this tutorial I'm taking simple imaginary game and expose the C++ and perl sides to each other. First of all, we need an interpreter object. For this simple game, we'll use a global interpreter:
Expand Down
8 changes: 4 additions & 4 deletions inc/Library/Build.pm
@@ -1,5 +1,7 @@
package Library::Build;

# This code needs some serious refactoring, but it works…

use 5.008;
use strict;
use warnings;
Expand Down Expand Up @@ -134,14 +136,12 @@ sub dispatch {
build_perl;
build_tap;

my $libdir = $options{libdir} || (split ' ', $Config{libpth})[0];
my $incdir = $options{incdir} || $Config{usrinc};
my $moddir = $options{moddir} || $Config{installprivlib};
install([
from_to => {
'blib/lib' => $libdir,
'blib/lib' => $options{libdir} || (split ' ', $Config{libpth})[0],
'perl++/headers' => "$incdir/perl++",
'lib' => $moddir,
'lib' => $options{moddir} || $Config{installprivlib},
},
verbose => $options{silent} <= 0,
dry_run => $options{dry_run},
Expand Down

0 comments on commit 71944f8

Please sign in to comment.