-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-remote-mediawiki: use toplevel's Makefile
This makes the Makefile simpler, while providing more features, and more consistency (the exact same rules with the exact same configuration as Git official commands are applied with the new version). Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
- Loading branch information
Matthieu Moy
authored and
Junio C Hamano
committed
Feb 8, 2013
1 parent
4c06b41
commit 1986768
Showing
3 changed files
with
11 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
git-remote-mediawiki |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,17 @@ | ||
# | ||
# Copyright (C) 2012 | ||
# Charles Roussel <charles.roussel@ensimag.imag.fr> | ||
# Simon Cathebras <simon.cathebras@ensimag.imag.fr> | ||
# Julien Khayat <julien.khayat@ensimag.imag.fr> | ||
# Guillaume Sasdy <guillaume.sasdy@ensimag.imag.fr> | ||
# Simon Perrat <simon.perrat@ensimag.imag.fr> | ||
# Copyright (C) 2013 | ||
# Matthieu Moy <Matthieu.Moy@imag.fr> | ||
# | ||
## Build git-remote-mediawiki | ||
|
||
-include ../../config.mak.autogen | ||
-include ../../config.mak | ||
SCRIPT_PERL=git-remote-mediawiki.perl | ||
GIT_ROOT_DIR=../.. | ||
HERE=contrib/mw-to-git/ | ||
|
||
ifndef PERL_PATH | ||
PERL_PATH = /usr/bin/perl | ||
endif | ||
ifndef gitexecdir | ||
gitexecdir = $(shell git --exec-path) | ||
endif | ||
SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL)) | ||
|
||
PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH)) | ||
gitexecdir_SQ = $(subst ','\'',$(gitexecdir)) | ||
SCRIPT = git-remote-mediawiki | ||
all: build | ||
|
||
.PHONY: install help doc test clean | ||
|
||
help: | ||
@echo 'This is the help target of the Makefile. Current configuration:' | ||
@echo ' gitexecdir = $(gitexecdir_SQ)' | ||
@echo ' PERL_PATH = $(PERL_PATH_SQ)' | ||
@echo 'Run "$(MAKE) install" to install $(SCRIPT) in gitexecdir' | ||
@echo 'Run "$(MAKE) test" to run the testsuite' | ||
|
||
install: | ||
sed -e '1s|#!.*/perl|#!$(PERL_PATH_SQ)|' $(SCRIPT) \ | ||
> '$(gitexecdir_SQ)/$(SCRIPT)' | ||
chmod +x '$(gitexecdir)/$(SCRIPT)' | ||
|
||
doc: | ||
@echo 'Sorry, "make doc" is not implemented yet for $(SCRIPT)' | ||
|
||
test: | ||
$(MAKE) -C t/ test | ||
|
||
clean: | ||
$(RM) '$(gitexecdir)/$(SCRIPT)' | ||
$(MAKE) -C t/ clean | ||
build install clean: | ||
$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=$(SCRIPT_PERL_FULL) \ | ||
$@-perl-script |
File renamed without changes.