summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-07-09 09:00:53 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-07-09 09:00:53 -0700
commitcd0c96a9e33b1c5e8b1b9f1219994b2c67fa396b (patch)
treeb4c6b390ec1687953231512410706030cc26a6b5
parentMerge branch 'rj/platform-pread-may-be-thread-unsafe' (diff)
parentperl/Makefile: Fix a missing double-quote (diff)
downloadtgif-cd0c96a9e33b1c5e8b1b9f1219994b2c67fa396b.tar.xz
Merge branch 'jn/perl-makemaker-leading-paths'
* jn/perl-makemaker-leading-paths: perl/Makefile: Fix a missing double-quote perl/Makefile: move "mkdir -p" to module installation loop for maintainability
-rw-r--r--perl/Makefile16
1 files changed, 14 insertions, 2 deletions
diff --git a/perl/Makefile b/perl/Makefile
index fe7a486464..6ca7d472eb 100644
--- a/perl/Makefile
+++ b/perl/Makefile
@@ -34,22 +34,34 @@ modules += Git/SVN/Ra
$(makfile): ../GIT-CFLAGS Makefile
echo all: private-Error.pm Git.pm Git/I18N.pm > $@
- echo ' mkdir -p blib/lib/Git/SVN/Memoize' >> $@
set -e; \
for i in $(modules); \
do \
+ if test $$i = $${i%/*}; \
+ then \
+ subdir=; \
+ else \
+ subdir=/$${i%/*}; \
+ fi; \
echo ' $(RM) blib/lib/'$$i'.pm' >> $@; \
+ echo ' mkdir -p blib/lib'$$subdir >> $@; \
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)/Git/SVN/Memoize"' >> $@
set -e; \
for i in $(modules); \
do \
+ if test $$i = $${i%/*}; \
+ then \
+ subdir=; \
+ else \
+ subdir=/$${i%/*}; \
+ fi; \
echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
+ echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)'$$subdir'"' >> $@; \
echo ' cp '$$i'.pm "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
done
echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@