git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Don't cache DESTDIR in perl/perl.mak.

From
Gerrit Pape <pape@smarden.org>
Date
Dec 10, 2007, 09:31 UTC
Message-ID
<20071210093102.3050.qmail@06e91d20307a62.315fe32.mid.smarden.org>

DESTDIR is supposed to be overridden on 'make install' after doing 'make'. Have the automatically generated perl/perl.mak not cache the value of DESTDIR to support that for the perl/ subdirectory also.

Signed-off-by: Gerrit Pape <pape@smarden.org>
---
 Makefile         |    2 +-
 perl/Makefile.PL |    6 +-----
 2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 4cdb84b..3615be0 100644
--- a/Makefile
+++ b/Makefile
@@ -1025,7 +1025,7 @@ install: all
 	$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
 	$(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'
 	$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
-	$(MAKE) -C perl prefix='$(prefix_SQ)' install
+	$(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
 ifndef NO_TCLTK
 	$(MAKE) -C gitk-git install
 	$(MAKE) -C git-gui install
diff --git a/perl/Makefile.PL b/perl/Makefile.PL
index 6aecd89..320253e 100644
--- a/perl/Makefile.PL
+++ b/perl/Makefile.PL
@@ -17,9 +17,6 @@ if ($@ || $Error::VERSION < 0.15009) {
 	$pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';
 }
 
-my %extra;
-$extra{DESTDIR} = $ENV{DESTDIR} if $ENV{DESTDIR};
-
 # redirect stdout, otherwise the message "Writing perl.mak for Git"
 # disrupts the output for the target 'instlibdir'
 open STDOUT, ">&STDERR";
@@ -29,6 +26,5 @@ WriteMakefile(
 	VERSION_FROM    => 'Git.pm',
 	PM		=> \%pm,
 	MAKEFILE	=> 'perl.mak',
-	INSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3',
-	%extra
+	INSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3'
 );
-- 
1.5.3.4
Next: Junio C Hamano
Message 1 of 5 in “Don't cache DESTDIR in perl/perl.mak.”
  1. Don't cache DESTDIR in perl/perl.mak.Gerrit Pape, Dec 10, 2007
  2. Junio C HamanoDec 10, 2007
  3. Eric WongDec 12, 2007
  4. Pierre HabouzitDec 12, 2007
  5. Gerrit PapeDec 18, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.