]> git.ipfire.org Git - thirdparty/git.git/blame - contrib/mw-to-git/Makefile
git-remote-mediawiki: test environment of git-remote-mediawiki
[thirdparty/git.git] / contrib / mw-to-git / Makefile
CommitLineData
8435b289
GS
1#
2# Copyright (C) 2012
3# Charles Roussel <charles.roussel@ensimag.imag.fr>
4# Simon Cathebras <simon.cathebras@ensimag.imag.fr>
5# Julien Khayat <julien.khayat@ensimag.imag.fr>
6# Guillaume Sasdy <guillaume.sasdy@ensimag.imag.fr>
7# Simon Perrat <simon.perrat@ensimag.imag.fr>
8#
9## Build git-remote-mediawiki
10
11-include ../../config.mak.autogen
12-include ../../config.mak
13
14ifndef PERL_PATH
15 PERL_PATH = /usr/bin/perl
16endif
17ifndef gitexecdir
18 gitexecdir = $(shell git --exec-path)
19endif
20
21PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
22gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
23SCRIPT = git-remote-mediawiki
24
25.PHONY: install help doc test clean
26
27help:
28 @echo 'This is the help target of the Makefile. Current configuration:'
29 @echo ' gitexecdir = $(gitexecdir_SQ)'
30 @echo ' PERL_PATH = $(PERL_PATH_SQ)'
31 @echo 'Run "$(MAKE) install" to install $(SCRIPT) in gitexecdir'
32 @echo 'Run "$(MAKE) test" to run the testsuite'
33
34install:
35 sed -e '1s|#!.*/perl|#!$(PERL_PATH_SQ)|' $(SCRIPT) \
36 > '$(gitexecdir_SQ)/$(SCRIPT)'
37 chmod +x '$(gitexecdir)/$(SCRIPT)'
38
39doc:
40 @echo 'Sorry, "make doc" is not implemented yet for $(SCRIPT)'
41
42test:
43 $(MAKE) -C t/ test
44
45clean:
46 $(RM) '$(gitexecdir)/$(SCRIPT)'
47 $(MAKE) -C t/ clean