worktree move: new command
[alt-git.git] / perl / Makefile
blobf657de20e3983af8f990114c24bddd2775845d88
2 # Makefile for perl support modules and routine
4 makfile:=perl.mak
5 modules =
7 PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
8 prefix_SQ = $(subst ','\'',$(prefix))
9 localedir_SQ = $(subst ','\'',$(localedir))
11 ifndef V
12 QUIET = @
13 endif
15 all install instlibdir: $(makfile)
16 $(QUIET)$(MAKE) -f $(makfile) $@
18 clean:
19 $(QUIET)test -f $(makfile) && $(MAKE) -f $(makfile) $@ || exit 0
20 $(RM) ppport.h
21 $(RM) $(makfile)
22 $(RM) $(makfile).old
23 $(RM) PM.stamp
25 $(makfile): PM.stamp
27 ifdef NO_PERL_MAKEMAKER
28 instdir_SQ = $(subst ','\'',$(prefix)/lib)
30 modules += Git
31 modules += Git/I18N
32 modules += Git/IndexInfo
33 modules += Git/Packet
34 modules += Git/SVN
35 modules += Git/SVN/Memoize/YAML
36 modules += Git/SVN/Fetcher
37 modules += Git/SVN/Editor
38 modules += Git/SVN/GlobSpec
39 modules += Git/SVN/Log
40 modules += Git/SVN/Migration
41 modules += Git/SVN/Prompt
42 modules += Git/SVN/Ra
43 modules += Git/SVN/Utils
45 $(makfile): ../GIT-CFLAGS Makefile
46 echo all: private-Error.pm Git.pm Git/I18N.pm > $@
47 set -e; \
48 for i in $(modules); \
49 do \
50 if test $$i = $${i%/*}; \
51 then \
52 subdir=; \
53 else \
54 subdir=/$${i%/*}; \
55 fi; \
56 echo ' $(RM) blib/lib/'$$i'.pm' >> $@; \
57 echo ' mkdir -p blib/lib'$$subdir >> $@; \
58 echo ' cp '$$i'.pm blib/lib/'$$i'.pm' >> $@; \
59 done
60 echo ' $(RM) blib/lib/Error.pm' >> $@
61 '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
62 echo ' cp private-Error.pm blib/lib/Error.pm' >> $@
63 echo install: >> $@
64 set -e; \
65 for i in $(modules); \
66 do \
67 if test $$i = $${i%/*}; \
68 then \
69 subdir=; \
70 else \
71 subdir=/$${i%/*}; \
72 fi; \
73 echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
74 echo ' mkdir -p "$$(DESTDIR)$(instdir_SQ)'$$subdir'"' >> $@; \
75 echo ' cp '$$i'.pm "$$(DESTDIR)$(instdir_SQ)/'$$i'.pm"' >> $@; \
76 done
77 echo ' $(RM) "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
78 '$(PERL_PATH_SQ)' -MError -e 'exit($$Error::VERSION < 0.15009)' || \
79 echo ' cp private-Error.pm "$$(DESTDIR)$(instdir_SQ)/Error.pm"' >> $@
80 echo instlibdir: >> $@
81 echo ' echo $(instdir_SQ)' >> $@
82 else
83 $(makfile): Makefile.PL ../GIT-CFLAGS
84 $(PERL_PATH) $< PREFIX='$(prefix_SQ)' INSTALL_BASE='' --localedir='$(localedir_SQ)'
85 endif
87 # this is just added comfort for calling make directly in perl dir
88 # (even though GIT-CFLAGS aren't used yet. If ever)
89 ../GIT-CFLAGS:
90 $(MAKE) -C .. GIT-CFLAGS