]> git.ipfire.org Git - thirdparty/git.git/blame - contrib/mw-to-git/Makefile
Sync with 2.16.6
[thirdparty/git.git] / contrib / mw-to-git / Makefile
CommitLineData
8435b289 1#
1986768f
MM
2# Copyright (C) 2013
3# Matthieu Moy <Matthieu.Moy@imag.fr>
8435b289 4#
8a7c2151
BP
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#
e1918906
BP
11# To install, run Git's toplevel 'make install' then run:
12#
13# make install
8435b289 14
e1918906 15GIT_MEDIAWIKI_PM=Git/Mediawiki.pm
1986768f 16SCRIPT_PERL=git-remote-mediawiki.perl
07a263b9 17SCRIPT_PERL+=git-mw.perl
1986768f
MM
18GIT_ROOT_DIR=../..
19HERE=contrib/mw-to-git/
8435b289 20
33f918c6
JN
21INSTALL = install
22
1986768f 23SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
e1918906
BP
24INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
25 -s --no-print-directory instlibdir)
c635b050
JN
26DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
27INSTLIBDIR_SQ = $(subst ','\'',$(INSTLIBDIR))
8435b289 28
1986768f 29all: build
8435b289 30
8987cda9
MM
31test: all
32 $(MAKE) -C t
33
34check: perlcritic test
35
e1918906 36install_pm:
c635b050 37 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/Git'
33f918c6 38 $(INSTALL) -m 644 $(GIT_MEDIAWIKI_PM) \
c635b050 39 '$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/$(GIT_MEDIAWIKI_PM)'
e1918906
BP
40
41build:
07a263b9 42 $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
e1918906
BP
43 build-perl-script
44
45install: install_pm
07a263b9 46 $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
e1918906
BP
47 install-perl-script
48
49clean:
07a263b9 50 $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
e1918906 51 clean-perl-script
e1918906 52
e3e7d345 53perlcritic:
8987cda9
MM
54 perlcritic -5 $(SCRIPT_PERL)
55 -perlcritic -2 $(SCRIPT_PERL)
56
57.PHONY: all test check install_pm install clean perlcritic