MinGW: Fix stat definitions to work with MinGW runtime version 4.0
[git/git-svn.git] / contrib / mw-to-git / Makefile
blob76fcd4defcc3ac751aa0c85b6388f6d408b476ca
2 # Copyright (C) 2013
3 # Matthieu Moy <Matthieu.Moy@imag.fr>
5 # To build and test:
7 # make
8 # bin-wrapper/git mw preview Some_page.mw
9 # bin-wrapper/git clone mediawiki::http://example.com/wiki/
11 # To install, run Git's toplevel 'make install' then run:
13 # make install
15 GIT_MEDIAWIKI_PM=Git/Mediawiki.pm
16 SCRIPT_PERL=git-remote-mediawiki.perl
17 SCRIPT_PERL+=git-mw.perl
18 GIT_ROOT_DIR=../..
19 HERE=contrib/mw-to-git/
21 SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
22 INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
23 -s --no-print-directory instlibdir)
25 all: build
27 install_pm:
28 install $(GIT_MEDIAWIKI_PM) $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
30 build:
31 $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
32 build-perl-script
34 install: install_pm
35 $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
36 install-perl-script
38 clean:
39 $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
40 clean-perl-script
41 rm $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
43 perlcritic:
44 perlcritic -2 *.perl