Build::Hopen::T::Gnu::C - support for the GNU toolset, C language
In a hopen file:
use language 'C'; my $op = C->new(op=>'compile'); # Create instances manually # Or use via Build::Hopen::G::GraphBuilder: $Build->H::files(...)->C::compile->default_goal;
The inputs come from earlier in the build graph. TODO support specifying compiler arguments.
What this node is going to do: compile or link.
compile
link
Arrayref of which files this node will process. Values are destination file names. Extensions may be added.
Arguments to the static functions are parsed using Build::Hopen::Arrrgs. Therefore, named arguments start with a hyphen (e.g., -name=>'foo', not name=>'foo').
-name=>'foo'
name=>'foo'
Create a new with "op" set to compile. Inputs come from the build graph, so parameters other than -name are disregarded (TODO permit specifying compilation options or object-file names). Usage:
-name
use language 'C'; $builder_or_dag->H::files('file1.c')->C::compile([-name=>'node name']);
Create a new with "op" set to link. Pass the name of the executable. Usage:
use language 'C'; $builder_or_dag->C::link('file1'[, -name=>'node name');
Create the compile or link command lines.
Find the C compiler.
TODO should this happen when the DAG runs? Maybe toolsets should get the chance to add a node to the beginning of the graph, before anything else runs. TODO figure this out.
To install Build::Hopen, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Build::Hopen
CPAN shell
perl -MCPAN -e shell install Build::Hopen
For more information on module installation, please visit the detailed CPAN module installation guide.