pnu/io-prompt/lib/Configure

io-prompt src

NAME

Makefile.pm - common code for Makefile builder and runner

SYNOPSIS

 perl6 Configure.p6

 
Where F<Configure.p6> generally has only these lines:
 # Configure.p6 - installer - see documentation in ../Configure.pm
 use v6; BEGIN { @*INC.push( '../..' ); }; use Configure; # proto dir

 

DESCRIPTION

A Perl module often needs a Makefile to specify how to build, test and install it. A Makefile must make sense to the Unix make utility. Makefiles must often be adjusted slightly to alter the context in which they will work. There are various tools to "make Makefiles" and this F<Configure.p6> and F<Configure.pm> combination run purely in Perl 6. Configure.p6 resides in the module top level directory. For covenience, Configure.p6 usually contains only the lines shown in L<doc:#SYNOPSIS> above, namely a comment and one line of code to pass execution to F<Configure.pm>. Any custom actions to prepare the module can be called by the default target in Makefile.in. Configure.pm reads F<Makefile.in> from the module top level directory, replaces certain variables marked like <THIS>, and writes the updated text to Makefile in the same directory. Finally it runs the standard 'make' utility, which builds the first target defined in Makefile.

VARIABLES

Configure.p6 will cause the following tokens to be substituted when creating the new F<Makefile>:
 <PERL6>        pathname of Perl 6 (fake)executable
 <PERL6LIB>     lib/ directory of the installed project
 <PERL6BIN>     bin/ directory of the installed project
 <RAKUDO_DIR>   whence Rakudo's Test.pm can be compiled

 

AUTHOR

Martin Berends (mberends on CPAN github #perl6 and @autoexec.demon.nl).

Perl 6 Tricks and Treats newsletter

Register to the free newsletter now, and get updates and news.
Email:
Name: