diff options
author | Steve Langasek <steve.langasek@canonical.com> | 2011-09-28 12:37:42 -0700 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-09-29 15:34:36 -0400 |
commit | a2e55ee97f603dac1fe08bdc3cf50bc875c2dfd7 (patch) | |
tree | 07e8c2652f917fd1cd33715ca483ba55577ed6bb /Debian/Debhelper/Buildsystem/perl_makemaker.pm | |
parent | 07fd879e68c61b258e22e729f044a928a80a517c (diff) |
pass dpkg-buildflags to makemaker build system
The standard way to pass build flags to makemaker perl build systems is to
set the OPTIMIZE variable on the commandline; CFLAGS in the environment gets
ignored entirely. So pass the CFLAGS from the environment to Makefile.PL so
makemaker packages can also benefit from dpkg-buildflags.
Diffstat (limited to 'Debian/Debhelper/Buildsystem/perl_makemaker.pm')
-rw-r--r-- | Debian/Debhelper/Buildsystem/perl_makemaker.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Debian/Debhelper/Buildsystem/perl_makemaker.pm b/Debian/Debhelper/Buildsystem/perl_makemaker.pm index 72f8d8c..0e9ff4c 100644 --- a/Debian/Debhelper/Buildsystem/perl_makemaker.pm +++ b/Debian/Debhelper/Buildsystem/perl_makemaker.pm @@ -39,17 +39,22 @@ sub new { sub configure { my $this=shift; + my @flags; # If set to a true value then MakeMaker's prompt function will # # always return the default without waiting for user input. $ENV{PERL_MM_USE_DEFAULT}=1; # This prevents Module::Install from interactive behavior. $ENV{PERL_AUTOINSTALL}="--skipdeps"; + if ($ENV{CFLAGS}) { + push @flags, "OPTIMIZE=$ENV{CFLAGS}"; + } + $this->doit_in_sourcedir("perl", "Makefile.PL", "INSTALLDIRS=vendor", # if perl_build is not tested first, need to pass packlist # option to handle fallthrough case (compat(7) ? "create_packlist=0" : ()), - @_); + @flags, @_); } sub install { |