2012-07-06 12:03:05 +02:00
|
|
|
#
|
2013-02-08 18:31:17 +01:00
|
|
|
# Copyright (C) 2013
|
|
|
|
# Matthieu Moy <Matthieu.Moy@imag.fr>
|
2012-07-06 12:03:05 +02:00
|
|
|
#
|
2013-07-04 22:38:56 +02:00
|
|
|
# To build and test:
|
|
|
|
#
|
|
|
|
# make
|
|
|
|
# bin-wrapper/git mw preview Some_page.mw
|
|
|
|
# bin-wrapper/git clone mediawiki::http://example.com/wiki/
|
|
|
|
#
|
2013-07-04 22:38:54 +02:00
|
|
|
# To install, run Git's toplevel 'make install' then run:
|
|
|
|
#
|
|
|
|
# make install
|
2012-07-06 12:03:05 +02:00
|
|
|
|
2013-07-04 22:38:54 +02:00
|
|
|
GIT_MEDIAWIKI_PM=Git/Mediawiki.pm
|
2013-02-08 18:31:17 +01:00
|
|
|
SCRIPT_PERL=git-remote-mediawiki.perl
|
2013-07-04 22:38:59 +02:00
|
|
|
SCRIPT_PERL+=git-mw.perl
|
2013-02-08 18:31:17 +01:00
|
|
|
GIT_ROOT_DIR=../..
|
|
|
|
HERE=contrib/mw-to-git/
|
2012-07-06 12:03:05 +02:00
|
|
|
|
2013-02-08 18:31:17 +01:00
|
|
|
SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
|
2013-07-04 22:38:54 +02:00
|
|
|
INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
|
|
|
|
-s --no-print-directory instlibdir)
|
2012-07-06 12:03:05 +02:00
|
|
|
|
2013-02-08 18:31:17 +01:00
|
|
|
all: build
|
2012-07-06 12:03:05 +02:00
|
|
|
|
2013-07-04 22:38:54 +02:00
|
|
|
install_pm:
|
|
|
|
install $(GIT_MEDIAWIKI_PM) $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
|
|
|
|
|
|
|
|
build:
|
2013-07-04 22:38:59 +02:00
|
|
|
$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
|
2013-07-04 22:38:54 +02:00
|
|
|
build-perl-script
|
|
|
|
|
|
|
|
install: install_pm
|
2013-07-04 22:38:59 +02:00
|
|
|
$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
|
2013-07-04 22:38:54 +02:00
|
|
|
install-perl-script
|
|
|
|
|
|
|
|
clean:
|
2013-07-04 22:38:59 +02:00
|
|
|
$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL="$(SCRIPT_PERL_FULL)" \
|
2013-07-04 22:38:54 +02:00
|
|
|
clean-perl-script
|
|
|
|
rm $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
|
|
|
|
|
2013-06-14 15:50:38 +02:00
|
|
|
perlcritic:
|
|
|
|
perlcritic -2 *.perl
|