1#
2# Copyright (C) 2013
3# Matthieu Moy <Matthieu.Moy@imag.fr>
4#
5# To install, run Git's toplevel 'make install' then run:
6#
7# make install
8
9GIT_MEDIAWIKI_PM=Git/Mediawiki.pm
10SCRIPT_PERL=git-remote-mediawiki.perl
11GIT_ROOT_DIR=../..
12HERE=contrib/mw-to-git/
13
14SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
15INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
16 -s --no-print-directory instlibdir)
17
18all: build
19
20install_pm:
21 install $(GIT_MEDIAWIKI_PM) $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
22
23build:
24 $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=$(SCRIPT_PERL_FULL) \
25 build-perl-script
26
27install: install_pm
28 $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=$(SCRIPT_PERL_FULL) \
29 install-perl-script
30
31clean:
32 $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=$(SCRIPT_PERL_FULL) \
33 clean-perl-script
34 rm $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
35
36perlcritic:
37 perlcritic -2 *.perl