All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Adam Roben <adam@roben.org>
Cc: git@vger.kernel.org, "Eric Wong" <normalperson@yhbt.net>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH] Fix git-svn in non-MakeMaker builds
Date: Fri, 15 Jun 2012 13:05:05 -0500	[thread overview]
Message-ID: <20120615180505.GH10752@burratino> (raw)
In-Reply-To: <1339781427-10568-1-git-send-email-adam@roben.org>

Adam Roben wrote:

> c102f4cf729a65b3520dbb17b52aa0c4fe4d4b29 and
> a6180325e885e2226d68144000e8bb18a906a2a6 split some git-svn code into
> separate modules, but forgot to inform the non-MakeMaker build about
> those new modules.

Good catch.  How about this patch against master (untested)?

-- >8 --
Subject: perl/Makefile: install Git::SVN::* when NO_PERL_MAKEMAKER=yes, too

v1.7.11-rc1~12^2~2 (2012-05-27) and friends split some git-svn code
into separate modules but did not update the fallback rules to install
them when NO_PERL_MAKEMAKER is set.  Add the appropriate rules so
users without MakeMaker can use git-svn again.

Affected modules: Git::SVN::Prompt, Git::SVN::Fetcher,
Git::SVN::Editor, Git::SVN::Ra, Git::SVN::Memoize::YAML.

Reported-by: Adam Roben <adam@roben.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmali.com>
---
Sensible?

In principle this should be two patches --- one to introduce the loop,
another to add Git::SVN::* to that loop.  Let me know if you think
this would be easier to read that way and I can try it.

 perl/Makefile |   31 ++++++++++++++++++++++++-------
 1 file changed, 24 insertions(+), 7 deletions(-)

diff --git a/perl/Makefile b/perl/Makefile
index 3e21766d..fe7a4864 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -2,6 +2,7 @@
 # Makefile for perl support modules and routine
 #
 makfile:=perl.mak
+modules =
 
 PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
 prefix_SQ = $(subst ','\'',$(prefix))
@@ -22,19 +23,35 @@ clean:
 
 ifdef NO_PERL_MAKEMAKER
 instdir_SQ = $(subst ','\'',$(prefix)/lib)
+
+modules += Git
+modules += Git/I18N
+modules += Git/SVN/Memoize/YAML
+modules += Git/SVN/Fetcher
+modules += Git/SVN/Editor
+modules += Git/SVN/Prompt
+modules += Git/SVN/Ra
+
 $(makfile): ../GIT-CFLAGS Makefile
 	echo all: private-Error.pm Git.pm Git/I18N.pm > $@
-	echo '	mkdir -p blib/lib/Git' >> $@
-	echo '	$(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
-	echo '	$(RM) blib/lib/Git/I18N.pm; cp Git/I18N.pm blib/lib/Git/' >> $@
+	echo '	mkdir -p blib/lib/Git/SVN/Memoize' >> $@
+	set -e; \
+	for i in $(modules); \
+	do \
+		echo '	$(RM) blib/lib/'$$i'.pm' >> $@; \
+		echo '	cp '$$i'.pm blib/lib/'$$i'.pm' >> $@; \
+	done
 	echo '	$(RM) blib/lib/Error.pm' >> $@
 	'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
 	echo '	cp private-Error.pm blib/lib/Error.pm' >> $@
 	echo install: >> $@
-	echo '	mkdir -p "$$(DESTDIR)$(instdir_SQ)"' >> $@
-	echo '	mkdir -p "$$(DESTDIR)$(instdir_SQ)/Git"' >> $@
-	echo '	$(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@
-	echo '	$(RM) "$$(DESTDIR)$(instdir_SQ)/Git/I18N.pm"; cp Git/I18N.pm "$$(DESTDIR)$(instdir_SQ)/Git"' >> $@
+	echo '	mkdir -p "$$(DESTDIR)$(instdir_SQ)/Git/SVN/Memoize"' >> $@
+	set -e; \
+	for i in $(modules); \
+	do \
+		echo '	$(RM) "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
+		echo '	cp '$$i'.pm "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
+	done
 	echo '	$(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
 	'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
 	echo '	cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
-- 
1.7.10.4

       reply	other threads:[~2012-06-15 18:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1339781427-10568-1-git-send-email-adam@roben.org>
2012-06-15 18:05 ` Jonathan Nieder [this message]
2012-06-15 18:14   ` [PATCH 2/1] perl/Makefile.PL: warn about duplicate module list in perl/Makefile Jonathan Nieder
2012-06-15 20:23     ` Junio C Hamano
2012-06-15 21:25   ` [PATCH] Fix git-svn in non-MakeMaker builds Junio C Hamano
2012-06-15 23:02     ` [PATCH] perl/Makefile: move "mkdir -p" to module installation loop for maintainability Jonathan Nieder
2012-06-15 23:10       ` Junio C Hamano
2012-06-29  8:07       ` [PATCH jn/perl-makemaker-leading-paths] perl/Makefile: Fix a missing double-quote Johannes Sixt
2012-06-29  8:55         ` Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120615180505.GH10752@burratino \
    --to=jrnieder@gmail.com \
    --cc=adam@roben.org \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.