Skip to contentSkip to conversation

pass DESTDIR to the generated perl/Makefile

PATCH New Eric Wong 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore

Eric Wong

author
#0 lore raw

PATCH 1/1 pass DESTDIR to the generated perl/Makefile

Makes life for binary packagers easier, as the Perl modules will be installed inside DESTDIR.

---
 perl/Makefile.PL |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
perl/Makefile.PL +4 -0
index 97ee9af..8df46a4 100644
@@ -22,10 +22,14 @@ if ($@) {
 	$pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
 }
 
+my %o;
+$o{DESTDIR} = $ENV{DESTDIR} if $ENV{DESTDIR};
+
 WriteMakefile(
 	NAME            => 'Git',
 	VERSION_FROM    => 'Git.pm',
 	PM		=> \%pm,
 	MYEXTLIB        => '../libgit.a',
 	INC             => '-I. -I..',
+	%o
 );
Signature · 1 line
1.4.2.GIT