3 # Matthieu Moy <Matthieu.Moy@imag.fr>
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:
15 GIT_MEDIAWIKI_PM=Git/Mediawiki.pm
16 SCRIPT_PERL=git-remote-mediawiki.perl
17 SCRIPT_PERL+=git-mw.perl
19 HERE=contrib/mw-to-git/
23 SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
24 INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
25 -s --no-print-directory instlibdir)
26 DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
27 INSTLIBDIR_SQ = $(subst ','\'',$(INSTLIBDIR))
34 check: perlcritic test
37 $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/Git'
38 $(INSTALL) -m 644 $(GIT_MEDIAWIKI_PM) \
39 '$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/$(GIT_MEDIAWIKI_PM)'
42 $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
46 $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
50 $(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
54 perlcritic -5 $(SCRIPT_PERL)
55 -perlcritic -2 $(SCRIPT_PERL)
57 .PHONY: all test check install_pm install clean perlcritic