| 1 |
BUILD INSTRUCTIONS |
| 2 |
You may decide to clone the Nama's github repository and from source |
| 3 |
rather than installing from CPAN. It is easier to browse or hack on |
| 4 |
Nama this way. Functionality is separated into a number of files, and |
| 5 |
you will see $::package_var instead of $Audio::Nama::package_var. |
| 6 |
|
| 7 |
You can get also updates more quickly and can share patches with other |
| 8 |
developers. |
| 9 |
|
| 10 |
Procedure |
| 11 |
For typical build and test: |
| 12 |
|
| 13 |
cpan Text::Template |
| 14 |
git-clone git://github.com/bolangi/nama.git |
| 15 |
cd nama/src |
| 16 |
./build |
| 17 |
./ui |
| 18 |
|
| 19 |
To install the module, do as usual: |
| 20 |
|
| 21 |
cd .. |
| 22 |
perl Makefile.PL |
| 23 |
make install |
| 24 |
|
| 25 |
How it works |
| 26 |
The build script creates the perl modules for the distribution under the |
| 27 |
nama/lib directory using *.p, *.pl, *.t and other files in the nama/src |
| 28 |
directory. |
| 29 |
|
| 30 |
build looks into the *.p files for lines that look like: |
| 31 |
|
| 32 |
[% somefile.pl %] |
| 33 |
|
| 34 |
This notation is analogous to the C-preprocessor #include directive: |
| 35 |
somefile.pl gets included in the source at that point. Some of these |
| 36 |
include lines are more complicated: |
| 37 |
|
| 38 |
[% qx(./strip_comments ./grammar_body) %] |
| 39 |
|
| 40 |
Here the preprocessor runs the script strip_comments on grammar_body, |
| 41 |
removing text that would choke the parser generator. |
| 42 |
|
| 43 |
Build provides a few parameters to the preprocessing script preproc, |
| 44 |
which uses the Text::Template to perform most of the required |
| 45 |
substitutions. |
| 46 |
|
| 47 |
To see the names of the files and scripts used to build the modules |
| 48 |
type: |
| 49 |
|
| 50 |
ls *.p |
| 51 |
grep '\[%' * # shows all include directives |
| 52 |
|