{"thread":{"id":"11219","subject":"[PATCH] Don't cache DESTDIR in perl/perl.mak.","startedAt":"2007-12-10T09:31:02Z","lastAt":"2007-12-18T14:25:37Z","messageCount":5,"participants":["Gerrit Pape","Junio C Hamano","Eric Wong","Pierre Habouzit"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"62555","messageId":"20071210093102.3050.qmail@06e91d20307a62.315fe32.mid.smarden.org","threadId":"11219","inReplyTo":null,"subject":"[PATCH] Don't cache DESTDIR in perl/perl.mak.","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2007-12-10T09:31:02Z","receivedAt":"2007-12-10T09:31:02Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"DESTDIR is supposed to be overridden on 'make install' after doing\n'make'.  Have the automatically generated perl/perl.mak not cache the\nvalue of DESTDIR to support that for the perl/ subdirectory also.\n\nSigned-off-by: Gerrit Pape <pape@smarden.org>\n---\n Makefile         |    2 +-\n perl/Makefile.PL |    6 +-----\n 2 files changed, 2 insertions(+), 6 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 4cdb84b..3615be0 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1025,7 +1025,7 @@ install: all\n \t$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n \t$(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'\n \t$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install\n-\t$(MAKE) -C perl prefix='$(prefix_SQ)' install\n+\t$(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install\n ifndef NO_TCLTK\n \t$(MAKE) -C gitk-git install\n \t$(MAKE) -C git-gui install\ndiff --git a/perl/Makefile.PL b/perl/Makefile.PL\nindex 6aecd89..320253e 100644\n--- a/perl/Makefile.PL\n+++ b/perl/Makefile.PL\n@@ -17,9 +17,6 @@ if ($@ || $Error::VERSION < 0.15009) {\n \t$pm{'private-Error.pm'} = '$(INST_LIBDIR)/Error.pm';\n }\n \n-my %extra;\n-$extra{DESTDIR} = $ENV{DESTDIR} if $ENV{DESTDIR};\n-\n # redirect stdout, otherwise the message \"Writing perl.mak for Git\"\n # disrupts the output for the target 'instlibdir'\n open STDOUT, \">&STDERR\";\n@@ -29,6 +26,5 @@ WriteMakefile(\n \tVERSION_FROM    => 'Git.pm',\n \tPM\t\t=> \\%pm,\n \tMAKEFILE\t=> 'perl.mak',\n-\tINSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3',\n-\t%extra\n+\tINSTALLSITEMAN3DIR => '$(SITEPREFIX)/share/man/man3'\n );\n-- \n1.5.3.4\n"},{"id":"62608","messageId":"7vodcyl5dy.fsf@gitster.siamese.dyndns.org","threadId":"11219","inReplyTo":"20071210093102.3050.qmail@06e91d20307a62.315fe32.mid.smarden.org","subject":"Re: [PATCH] Don't cache DESTDIR in perl/perl.mak.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-12-10T19:24:41Z","receivedAt":"2007-12-10T19:24:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Hmph.  That's reverting this:\n\ncommit 4c5cf8c44ce06a79da5bafd4a92e6d6f598cea2e\nAuthor: Eric Wong <normalperson@yhbt.net>\nDate:   Sun Aug 13 04:13:25 2006 -0700\n\n    pass DESTDIR to the generated perl/Makefile\n    \n    Makes life for binary packagers easier, as the Perl modules will\n    be installed inside DESTDIR.\n    \n    Signed-off-by: Eric Wong <normalperson@yhbt.net>\n    Signed-off-by: Junio C Hamano <junkio@cox.net>\n\nEric, care to comment?\n"},{"id":"62938","messageId":"20071212180050.GA18980@untitled","threadId":"11219","inReplyTo":"7vodcyl5dy.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Don't cache DESTDIR in perl/perl.mak.","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-12-12T18:01:48Z","receivedAt":"2007-12-12T18:01:48Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n> Hmph.  That's reverting this:\n> \n> commit 4c5cf8c44ce06a79da5bafd4a92e6d6f598cea2e\n> Author: Eric Wong <normalperson@yhbt.net>\n> Date:   Sun Aug 13 04:13:25 2006 -0700\n> \n>     pass DESTDIR to the generated perl/Makefile\n>     \n>     Makes life for binary packagers easier, as the Perl modules will\n>     be installed inside DESTDIR.\n>     \n>     Signed-off-by: Eric Wong <normalperson@yhbt.net>\n>     Signed-off-by: Junio C Hamano <junkio@cox.net>\n> \n> Eric, care to comment?\n\nI used to make a statically linked binary package for working on an\nancient box that didn't have a lot of libraries I wanted, and I probably\njust called `make install' into DESTDIR as a single step without calling\n`make' alone without DESTDIR argument, or I had DESTDIR set in\nconfig.mak\n\n-- \nEric Wong\n"},{"id":"62958","messageId":"20071212200211.GB1060@artemis.madism.org","threadId":"11219","inReplyTo":"20071212180050.GA18980@untitled","subject":"Re: [PATCH] Don't cache DESTDIR in perl/perl.mak.","fromName":"Pierre Habouzit","fromEmail":"madcoder@debian.org","sentAt":"2007-12-12T20:02:11Z","receivedAt":"2007-12-12T20:02:11Z","isPatch":true,"sender":{"key":"madcoder@debian.org","avatar":"https://avatars.githubusercontent.com/u/44708?v=4"},"body":"On Wed, Dec 12, 2007 at 06:01:48PM +0000, Eric Wong wrote:\n> Junio C Hamano <gitster@pobox.com> wrote:\n> > Hmph.  That's reverting this:\n> > \n> > commit 4c5cf8c44ce06a79da5bafd4a92e6d6f598cea2e\n> > Author: Eric Wong <normalperson@yhbt.net>\n> > Date:   Sun Aug 13 04:13:25 2006 -0700\n> > \n> >     pass DESTDIR to the generated perl/Makefile\n> >     \n> >     Makes life for binary packagers easier, as the Perl modules will\n> >     be installed inside DESTDIR.\n> >     \n> >     Signed-off-by: Eric Wong <normalperson@yhbt.net>\n> >     Signed-off-by: Junio C Hamano <junkio@cox.net>\n> > \n> > Eric, care to comment?\n> \n> I used to make a statically linked binary package for working on an\n> ancient box that didn't have a lot of libraries I wanted, and I probably\n> just called `make install' into DESTDIR as a single step without calling\n> `make' alone without DESTDIR argument, or I had DESTDIR set in\n> config.mak\n\n  Actually this fact generated a bug in debian packaging because git is\nbuilt then installed twice in different DESTDIRS, then parts of the\ninstall is pruned (the two installs are arch-dependant and\narch-independant files install so it's a very good reason in term of\npackaging).\n\n  The fact that perl.mak caches the DESTDIR make it install things in\nthe wrong place because it doesn't honour make DESTDIR=foo install and\nalways use the cached value instead, which is wrong.\n\n  I think Gerrit won't care if it's cached or not, he just cares that it\nstill honours environment if present.\n-- \n·O·  Pierre Habouzit\n··O                                                madcoder@debian.org\nOOO                                                http://www.madism.org\n"},{"id":"63613","messageId":"20071218142537.23571.qmail@5b1a609bf11950.315fe32.mid.smarden.org","threadId":"11219","inReplyTo":"20071212200211.GB1060@artemis.madism.org","subject":"Re: [PATCH] Don't cache DESTDIR in perl/perl.mak.","fromName":"Gerrit Pape","fromEmail":"pape@smarden.org","sentAt":"2007-12-18T14:25:37Z","receivedAt":"2007-12-18T14:25:37Z","isPatch":true,"sender":{"key":"pape@smarden.org","avatar":"https://avatars.githubusercontent.com/u/143170252?v=4"},"body":"On Wed, Dec 12, 2007 at 09:02:11PM +0100, Pierre Habouzit wrote:\n> On Wed, Dec 12, 2007 at 06:01:48PM +0000, Eric Wong wrote:\n> > Junio C Hamano <gitster@pobox.com> wrote:\n> > > Hmph.  That's reverting this:\n> > > \n> > > commit 4c5cf8c44ce06a79da5bafd4a92e6d6f598cea2e\n\n> > > Eric, care to comment?\n> > \n> > I used to make a statically linked binary package for working on an\n> > ancient box that didn't have a lot of libraries I wanted, and I probably\n> > just called `make install' into DESTDIR as a single step without calling\n> > `make' alone without DESTDIR argument, or I had DESTDIR set in\n> > config.mak\n> \n>   Actually this fact generated a bug in debian packaging because git is\n> built then installed twice in different DESTDIRS, then parts of the\n> install is pruned (the two installs are arch-dependant and\n> arch-independant files install so it's a very good reason in term of\n> packaging).\n> \n>   The fact that perl.mak caches the DESTDIR make it install things in\n> the wrong place because it doesn't honour make DESTDIR=foo install and\n> always use the cached value instead, which is wrong.\n> \n>   I think Gerrit won't care if it's cached or not, he just cares that it\n> still honours environment if present.\n\nYes, precisely.  Thanks, Gerrit.\n"}]}