Re: [PATCH 2/3] Test environment of git-remote-mw

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx> writes:

> "Simon.Cathebras" <Simon.Cathebras@xxxxxxxxxxxxxxx> writes:
>
>> On the other hand, considering the git-mediawiki is curently on
>> contrib branch, shall we move our test environement from git/t to
>> git/contrib/t ?
>
> If so, that would be to $git/contrib/mw-to-git/t/.
>
> I'm not sur what's best, depending on the future of the tool:
>
> If, once Git-MediaWiki is robust, well-tested, ... and enough people are
> interested, it may make sense to move Git-MediaWiki out of the contrib/
> directory, and integrate it as an official command (like git-svn for
> example). That would make the installation process seamless ("make
> install" would install git-remote-mediawiki like other commands, "make
> doc" would generate the doc, and so on), which would be nice for the
> user.

Here's another attempt to be nice to the user, without getting out of
the contrib/ directory. I suggest that you include it in your patch
serie, and build your stuff on top of it.

--------------- 8< ----------------- 8< ------------------------
>From 25187a652abc0b546be2fb1afb707b32b9f1d4fc Mon Sep 17 00:00:00 2001
From: Matthieu Moy <Matthieu.Moy@xxxxxxx>
Date: Fri, 1 Jun 2012 11:18:20 +0200
Subject: [PATCH] git-remote-mediawiki: simple Makefile for simple
 installation

This allows the user to run "make check" to install the script in Git's
exec path, following the configuration (manual in config.mak, or through
autoconf).
---
 contrib/mw-to-git/Makefile | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 contrib/mw-to-git/Makefile

diff --git a/contrib/mw-to-git/Makefile b/contrib/mw-to-git/Makefile
new file mode 100644
index 0000000..99b7caa
--- /dev/null
+++ b/contrib/mw-to-git/Makefile
@@ -0,0 +1,29 @@
+-include ../../config.mak
+-include ../../config.mak.autogen
+
+ifndef PERL_PATH
+	PERL_PATH = /usr/bin/perl
+endif
+
+PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
+gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
+
+SCRIPT=git-remote-mediawiki
+
+.PHONY: install help doc test
+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.'
+
+install:
+	sed -e '1s|#!.*/perl|#!$(PERL_PATH_SQ)|' $(SCRIPT) \
+            > '$(gitexecdir_SQ)/$(SCRIPT)'
+	chmod 755 '$(gitexecdir)/$(SCRIPT)'
+
+doc:
+	@echo 'Sorry, "make doc" is not implemented yet for $(SCRIPT)'
+
+test:
+	@echo 'Sorry, "make test" is not implemented yet for $(SCRIPT)'
-- 
1.7.10.2.817.g37218b0



-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]