1 package Module::Install::Compiler;
5 use Module::Install::Base ();
7 use vars qw{$VERSION @ISA $ISCORE};
10 @ISA = 'Module::Install::Base';
16 if ( $self->is_admin ) {
17 return $self->admin->ppport(@_);
19 # Fallback to just a check
20 my $file = shift || 'ppport.h';
22 die "Packaging error, $file is missing";
30 $self->makemaker_args(
31 OBJECT => join ' ', map { substr($_, 0, -2) . $Config::Config{_o} } @_
37 $self->makemaker_args(
38 INC => join ' ', map { "-I$_" } @_
44 $self->makemaker_args(
45 LIBS => join ' ', map { "-L$_" } @_
51 $self->makemaker_args(
52 LIBS => join ' ', $self->makemaker_args->{LIBS}, map { "-l$_" } @_
56 sub cc_optimize_flags {
58 $self->makemaker_args(
59 OPTIMIZE => join ' ', @_
71 Module::Install::Compiler - Commands for interacting with the C compiler
79 Many Perl modules that contains C and XS code have fiendishly complex
80 F<Makefile.PL> files, because L<ExtUtils::MakeMaker> doesn't itself provide
81 a huge amount of assistance and automation in this area.
83 B<Module::Install::Compiler> provides a number of commands that take care
84 of common utility tasks, and try to take some of intricacy out of creating
93 The current implementation is relatively fragile and minimalistic.
95 It only handles some very basic wrapper around L<ExtUtils::MakeMaker>.
97 It is currently undergoing extensive refactoring to provide a more
98 generic compiler flag generation capability. This may take some time,
99 and if anyone who maintains a Perl module that makes use of the compiler
100 would like to help out, your assistance would be greatly appreciated.
104 L<Module::Install>, L<ExtUtils::MakeMaker>
108 Refactored by Adam Kennedy E<lt>adamk@cpan.orgE<gt>
110 Mostly by Audrey Tang E<lt>autrijus@autrijus.orgE<gt>
112 Based on original works by Brian Ingerson E<lt>ingy@cpan.orgE<gt>
116 Copyright 2002, 2003, 2004, 2006 by Adam Kennedy, Audrey Tang, Brian Ingerson.
118 This program is free software; you can redistribute it and/or modify it
119 under the same terms as Perl itself.
121 See L<http://www.perl.com/perl/misc/Artistic.html>