Alien-Base-ModuleBuild
view release on metacpan or search on metacpan
lib/Alien/Base/ModuleBuild/FAQ.pod view on Meta::CPAN
120121122123124125126127128129130131132133134135136137138139140
# (Again, if you cannot determine the version,
# it is usually sufficent to return a true value)
return
$version
;
}
=item set C<alien_provides_cflags> and C<alien_provides_libs> in C<Build.PL>.
Add something like this to your C<Build.PL>:
# Build.PL
use lib 'inc';
use My::ModuleBuild;
My::ModuleBuild->new(
...
alien_provides_cflags => '-I/usr/include/foo',
alien_provides_libs => '-L/usr/lib/foo -lfoo',
...
);
Note that it is frequently sufficient to provide C<alien_provides_libs> and the appropriate C<-l> flag.
lib/Alien/Base/ModuleBuild/FAQ.pod view on Meta::CPAN
375376377378379380381382383384385386387388389390391392393394395=head2 Can/Should I write a tool oriented Alien module using C<Alien::Base> that provides executables instead of a library?
Certainly. The original intent was to provide libraries, but tools are also quite doable using the
C<Alien::Base> tool set. A simple minded example of this which is fairly easy to replicate is L<Alien::m4>.
In general, this means specifying a subclass in your C<Build.PL> and bundling it in your distribution C<inc> directory.
C<Build.PL>:
...
use lib 'inc';
use My::ModuleBuild;
My::ModuleBuild->new(
...
)->create_build_script;
C<inc/My/ModuleBuild.pm>:
package My::ModuleBuild;
t/alien_base_modulebuild.t view on Meta::CPAN
12345678910
( run in 0.246 second using v1.01-cache-2.11-cpan-1dc43b0fbd2 )