add new Perl API: Git::Repo, Git::Commit, Git::Tag, and Git::RepoRoot
[git/gitweb-caching.git] / perl / Makefile
blob4572dc50a4f0cd53747ac0395e42d0142df0e116
2 # Makefile for perl support modules and routine
4 makfile:=perl.mak
6 PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
7 prefix_SQ = $(subst ','\'',$(prefix))
9 ifndef V
10 QUIET = @
11 endif
13 all install instlibdir: $(makfile)
14 $(QUIET)$(MAKE) -f $(makfile) $@
16 clean:
17 $(QUIET)test -f $(makfile) && $(MAKE) -f $(makfile) $@ || exit 0
18 $(RM) ppport.h
19 $(RM) $(makfile)
20 $(RM) $(makfile).old
22 ifdef NO_PERL_MAKEMAKER
23 instdir_SQ = $(subst ','\'',$(prefix)/lib)
24 $(makfile): ../GIT-CFLAGS Makefile
25 echo all: private-Error.pm Git.pm > $@
26 echo ' mkdir -p blib/lib' >> $@
27 echo ' $(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
28 echo ' $(RM) blib/lib/Error.pm' >> $@
29 '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
30 echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
31 echo install: >> $@
32 echo ' mkdir -p "$(instdir_SQ)"' >> $@
33 echo ' $(RM) "$(instdir_SQ)/Git.pm"; cp Git.pm "$(instdir_SQ)"' >> $@
34 echo ' mkdir -p "$(instdir_SQ)/Git"; $(RM) "$(instdir_SQ)"/Git/*.pm; cp Git/*.pm "$(instdir_SQ)/Git"' >> $@
35 echo ' $(RM) "$(instdir_SQ)/Error.pm"' >> $@
36 '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
37 echo ' cp private-Error.pm "$(instdir_SQ)/Error.pm"' >> $@
38 echo instlibdir: >> $@
39 echo ' echo $(instdir_SQ)' >> $@
40 else
41 $(makfile): Makefile.PL ../GIT-CFLAGS
42 $(PERL_PATH) $< PREFIX='$(prefix_SQ)'
43 endif
45 # this is just added comfort for calling make directly in perl dir
46 # (even though GIT-CFLAGS aren't used yet. If ever)
47 ../GIT-CFLAGS:
48 $(MAKE) -C .. GIT-CFLAGS