]>
Commit | Line | Data |
---|---|---|
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 | ||
14 | ifndef PERL_PATH | |
15 | PERL_PATH = /usr/bin/perl | |
16 | endif | |
17 | ifndef gitexecdir | |
18 | gitexecdir = $(shell git --exec-path) | |
19 | endif | |
20 | ||
21 | PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) | |
22 | gitexecdir_SQ = $(subst ','\'',$(gitexecdir)) | |
23 | SCRIPT = git-remote-mediawiki | |
24 | ||
25 | .PHONY: install help doc test clean | |
26 | ||
27 | help: | |
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 | ||
34 | install: | |
35 | sed -e '1s|#!.*/perl|#!$(PERL_PATH_SQ)|' $(SCRIPT) \ | |
36 | > '$(gitexecdir_SQ)/$(SCRIPT)' | |
37 | chmod +x '$(gitexecdir)/$(SCRIPT)' | |
38 | ||
39 | doc: | |
40 | @echo 'Sorry, "make doc" is not implemented yet for $(SCRIPT)' | |
41 | ||
42 | test: | |
43 | $(MAKE) -C t/ test | |
44 | ||
45 | clean: | |
46 | $(RM) '$(gitexecdir)/$(SCRIPT)' | |
47 | $(MAKE) -C t/ clean |