contrib / mw-to-git / Makefileon commit Merge branch 'jc/maint-pull-docfix' into maint (01a5774)
   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
  27test: all
  28        $(MAKE) -C t
  29
  30check: perlcritic test
  31
  32install_pm:
  33        install $(GIT_MEDIAWIKI_PM) $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
  34
  35build:
  36        $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
  37                build-perl-script
  38
  39install: install_pm
  40        $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
  41                install-perl-script
  42
  43clean:
  44        $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
  45                clean-perl-script
  46        rm $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
  47
  48perlcritic:
  49        perlcritic -5 $(SCRIPT_PERL)
  50        -perlcritic -2 $(SCRIPT_PERL)
  51
  52.PHONY: all test check install_pm install clean perlcritic