]>
Commit | Line | Data |
---|---|---|
f848718a AR |
1 | # |
2 | # Makefile for perl support modules and routine | |
3 | # | |
4 | makfile:=perl.mak | |
5 | ||
6 | PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) | |
7 | prefix_SQ = $(subst ','\'',$(prefix)) | |
5e9637c6 | 8 | localedir_SQ = $(subst ','\'',$(localedir)) |
f848718a | 9 | |
2314c947 | 10 | ifndef V |
74f2b2a8 SP |
11 | QUIET = @ |
12 | endif | |
13 | ||
f848718a | 14 | all install instlibdir: $(makfile) |
74f2b2a8 | 15 | $(QUIET)$(MAKE) -f $(makfile) $@ |
f848718a AR |
16 | |
17 | clean: | |
74f2b2a8 | 18 | $(QUIET)test -f $(makfile) && $(MAKE) -f $(makfile) $@ || exit 0 |
f848718a AR |
19 | $(RM) ppport.h |
20 | $(RM) $(makfile) | |
21 | $(RM) $(makfile).old | |
22 | ||
23 | ifdef NO_PERL_MAKEMAKER | |
24 | instdir_SQ = $(subst ','\'',$(prefix)/lib) | |
25 | $(makfile): ../GIT-CFLAGS Makefile | |
058fb414 BC |
26 | echo all: private-Error.pm Git.pm > $@ |
27 | echo ' mkdir -p blib/lib' >> $@ | |
28 | echo ' $(RM) blib/lib/Git.pm; cp Git.pm blib/lib/' >> $@ | |
29 | echo ' $(RM) blib/lib/Error.pm' >> $@ | |
30 | '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \ | |
31 | echo ' cp private-Error.pm blib/lib/Error.pm' >> $@ | |
f848718a | 32 | echo install: >> $@ |
3696c4ce JH |
33 | echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)"' >> $@ |
34 | echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Git.pm"; cp Git.pm "$$(DESTDIR)$(instdir_SQ)"' >> $@ | |
35 | echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@ | |
058fb414 | 36 | '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \ |
3696c4ce | 37 | echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@ |
f848718a AR |
38 | echo instlibdir: >> $@ |
39 | echo ' echo $(instdir_SQ)' >> $@ | |
40 | else | |
41 | $(makfile): Makefile.PL ../GIT-CFLAGS | |
5e9637c6 | 42 | $(PERL_PATH) $< PREFIX='$(prefix_SQ)' INSTALL_BASE='' --localedir='$(localedir_SQ)' |
f848718a AR |
43 | endif |
44 | ||
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 |