summaryrefslogtreecommitdiff
path: root/perl/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'perl/Makefile')
-rw-r--r--perl/Makefile51
1 files changed, 46 insertions, 5 deletions
diff --git a/perl/Makefile b/perl/Makefile
index b2977cd0bc..15d96fcc7a 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))
@@ -19,19 +20,59 @@ clean:
$(RM) ppport.h
$(RM) $(makfile)
$(RM) $(makfile).old
+ $(RM) PM.stamp
+
+$(makfile): PM.stamp
ifdef NO_PERL_MAKEMAKER
instdir_SQ = $(subst ','\'',$(prefix)/lib)
+
+modules += Git
+modules += Git/I18N
+modules += Git/IndexInfo
+modules += Git/SVN
+modules += Git/SVN/Memoize/YAML
+modules += Git/SVN/Fetcher
+modules += Git/SVN/Editor
+modules += Git/SVN/GlobSpec
+modules += Git/SVN/Log
+modules += Git/SVN/Migration
+modules += Git/SVN/Prompt
+modules += Git/SVN/Ra
+modules += Git/SVN/Utils
+
$(makfile): ../GIT-CFLAGS Makefile
- echo all: private-Error.pm Git.pm > $@
- echo ' mkdir -p blib/lib' >> $@
- echo ' $(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
+ echo all: private-Error.pm Git.pm Git/I18N.pm > $@
+ 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)"' >> $@
- echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@
+ 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"' >> $@
'$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@