1
=begin
2
3
=head1 Adding a New Build Tool
4
5
There are a great many build tools in the wild, from F<make> to F<Build>,
6
F<rake> to F<distutils>.  Each of these has its own conventions, command
7
structure, and so on.  This document describes the steps necessary to add
8
support for a new build tool to Plumage.
9
10
11
=head2 System Program Location
12
13
If the tool requires a system program not yet known to Plumage, you will need
14
to add a line to the C<find_binaries()> sub at the end of the C<INIT> section
15
of F<src/plumage.nqp> to cache the location of the new binary.  There are three
16
stanzas to choose from, each finding programs using a different technique:
17
18
=over 4
19
20
=item *
21
22
Programs installed with parrot
23
24
=item *
25
26
Programs used to build parrot
27
28
=item *
29
30
Miscellaneous programs in the user's search path
31
32
=back
33
34
35
=head2 Build Tool Type Name
36
37
Each build tool is identified in the metadata by a unique type name matching
38
C</^[a-z][a-z0-9_]*[a-z0-9]$/>.  For unique or cross-language tools, the type
39
name is generally just the lowercase name of the build tool; C<make> and
40
C<rake> use this convention.  If this might be ambiguous, or the tool depends
41
on an unrelated program, a more specific name can be used; C<perl5_build> and
42
C<parrot_setup> are examples of this.
43
44
Please discuss your suggested new build type name with the Plumage development
45
team before committing to the new name -- we'd prefer not to have to change
46
it after users have already started depending on it.
47
48
49
=head2 Specific Action Methods
50
51
For each project action in F<src/lib/Plumage/Project.nqp> that the new build
52
tool supports, you will need to add specific action methods to implement that
53
action using the new tool.  These are named with the base action method name
54
and the build tool's type name separated by an underscore.  For example, to
55
support Parrot's F<setup.pir> tool, with the type name C<parrot_setup>, we
56
added new methods named C<build_parrot_setup()>, C<test_parrot_setup()>, and
57
so on.  Each of these must return 1 for success and 0 for failure.
58
59
60
=head2 Documentation
61
62
XXXX: SPECULATIVE
63
64
Add a new entry to the list of supported build tools, and describe the tool
65
in more detail, along with any special features or limitations of the Plumage
66
support in the C<DESCRIPTION> section of F<src/lib/Plumage/Project.nqp>'s POD.
67
68
69
=head2 Tests
70
71
C<Plumage::Project> does not have a test suite yet.
72
73
74
=end