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: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
|
|
|
|
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))
|
2013-07-04 22:38:54 +02:00
|
|
|
INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
|
|
|
|
-s --no-print-directory instlibdir)
|
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-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:
|
|
|
|
$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=$(SCRIPT_PERL_FULL) \
|
|
|
|
build-perl-script
|
|
|
|
|
|
|
|
install: install_pm
|
2013-02-08 18:31:17 +01:00
|
|
|
$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=$(SCRIPT_PERL_FULL) \
|
2013-07-04 22:38:54 +02:00
|
|
|
install-perl-script
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=$(SCRIPT_PERL_FULL) \
|
|
|
|
clean-perl-script
|
|
|
|
|
2013-06-14 15:50:38 +02:00
|
|
|
perlcritic:
|
|
|
|
perlcritic -2 *.perl
|