Install Git/I18N.pm even in the absence of Perl's MakeMaker
[git/dscho.git] / perl / Makefile
blob91848f3d3c0af4da9139c796f8aa053b1df8740d
2 # Makefile for perl support modules and routine
4 makfile:=perl.mak
6 PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
7 prefix_SQ = $(subst ','\'',$(prefix))
8 localedir_SQ = $(subst ','\'',$(localedir))
10 ifndef V
11 QUIET = @
12 endif
14 all install instlibdir: $(makfile)
15 $(QUIET)$(MAKE) -f $(makfile) $@
17 clean:
18 $(QUIET)test -f $(makfile) && $(MAKE) -f $(makfile) $@ || exit 0
19 $(RM) ppport.h
20 $(RM) $(makfile)
21 $(RM) $(makfile).old
23 ifdef NO_PERL_MAKEMAKER
24 instdir_SQ = $(subst ','\'',$(prefix)/lib)
25 $(makfile): ../GIT-CFLAGS Makefile
26 echo all: private-Error.pm Git.pm > $@
27 echo ' mkdir -p blib/lib/Git' >> $@
28 echo ' $(RM) blib/lib/Git/I18N.pm; cp Git/I18N.pm blib/lib/Git/' >> $@
29 echo ' $(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@
30 echo ' $(RM) blib/lib/Error.pm' >> $@
31 '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
32 echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
33 echo install: >> $@
34 echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)/Git"' >> $@
35 echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git/I18N.pm"; cp Git/I18N.pm "$$(DESTDIR)$(instdir_SQ)/Git/"' >> $@
36 echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@
37 echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
38 '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
39 echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
40 echo instlibdir: >> $@
41 echo ' echo $(instdir_SQ)' >> $@
42 else
43 $(makfile): Makefile.PL ../GIT-CFLAGS
44 $(PERL_PATH) $< PREFIX='$(prefix_SQ)' INSTALL_BASE='' --localedir='$(localedir_SQ)'
45 endif
47 # this is just added comfort for calling make directly in perl dir
48 # (even though GIT-CFLAGS aren't used yet. If ever)
49 ../GIT-CFLAGS:
50 $(MAKE) -C .. GIT-CFLAGS