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