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-11-11 21:45:50 +01:00
|
|
|
INSTALL = install
|
|
|
|
|
2013-02-08 18:31:17 +01:00
|
|
|
SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
|
2018-04-10 15:36:41 +02:00
|
|
|
INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/ \
|
|
|
|
-s --no-print-directory prefix=$(prefix) \
|
|
|
|
perllibdir=$(perllibdir) perllibdir)
|
2013-11-11 21:46:12 +01:00
|
|
|
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
|
|
|
|
INSTLIBDIR_SQ = $(subst ','\'',$(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-08-29 20:58:21 +02:00
|
|
|
test: all
|
|
|
|
$(MAKE) -C t
|
|
|
|
|
|
|
|
check: perlcritic test
|
|
|
|
|
2013-07-04 22:38:54 +02:00
|
|
|
install_pm:
|
2013-11-11 21:46:12 +01:00
|
|
|
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/Git'
|
2013-11-11 21:45:50 +01:00
|
|
|
$(INSTALL) -m 644 $(GIT_MEDIAWIKI_PM) \
|
2013-11-11 21:46:12 +01:00
|
|
|
'$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/$(GIT_MEDIAWIKI_PM)'
|
2013-07-04 22:38:54 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2013-06-14 15:50:38 +02:00
|
|
|
perlcritic:
|
2013-08-29 20:58:21 +02:00
|
|
|
perlcritic -5 $(SCRIPT_PERL)
|
|
|
|
-perlcritic -2 $(SCRIPT_PERL)
|
|
|
|
|
|
|
|
.PHONY: all test check install_pm install clean perlcritic
|