contrib / mw-to-git / Makefileon commit Merge branch 'ms/fetch-prune-configuration' (a5e10f8)
   1#
   2# Copyright (C) 2013
   3#     Matthieu Moy <Matthieu.Moy@imag.fr>
   4#
   5# To build and test:
   6#
   7#   make
   8#   bin-wrapper/git mw preview Some_page.mw
   9#   bin-wrapper/git clone mediawiki::http://example.com/wiki/
  10#
  11# To install, run Git's toplevel 'make install' then run:
  12#
  13#   make install
  14
  15GIT_MEDIAWIKI_PM=Git/Mediawiki.pm
  16SCRIPT_PERL=git-remote-mediawiki.perl
  17SCRIPT_PERL+=git-mw.perl
  18GIT_ROOT_DIR=../..
  19HERE=contrib/mw-to-git/
  20
  21SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
  22INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
  23                -s --no-print-directory instlibdir)
  24
  25all: build
  26
  27install_pm:
  28        install $(GIT_MEDIAWIKI_PM) $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
  29
  30build:
  31        $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
  32                build-perl-script
  33
  34install: install_pm
  35        $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
  36                install-perl-script
  37
  38clean:
  39        $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
  40                clean-perl-script
  41        rm $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
  42
  43perlcritic:
  44        perlcritic -2 *.perl