git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: benoit.person@ensimag.fr
To: git@vger.kernel.org
Cc: Celestin Matte <celestin.matte@ensimag.fr>,
	Jeff King <peff@peff.net>,
	Matthieu Moy <matthieu.moy@grenoble-inp.fr>,
	Benoit Person <benoit.person@ensimag.fr>
Subject: [PATCH/RFC 1/4] git-mw: Introduction of GitMediawiki.pm
Date: Thu, 13 Jun 2013 12:07:16 +0200	[thread overview]
Message-ID: <1371118039-18925-2-git-send-email-benoit.person@ensimag.fr> (raw)
In-Reply-To: <1371118039-18925-1-git-send-email-benoit.person@ensimag.fr>

From: Benoit Person <benoit.person@ensimag.fr>

The GitMediawiki.pm goal is to share code betwwen several scripts in
Git-Mediawiki (for now, git-mw.perl introduced in this patch serie and
git-remote-mediawiki.perl)

Signed-off-by: Benoit Person <benoit.person@ensimag.fr>
Signed-off-by: Matthieu Moy <matthieu.moy@grenoble-inp.fr>

---
 contrib/mw-to-git/GitMediawiki.pm | 24 ++++++++++++++++++++++++
 contrib/mw-to-git/Makefile        | 19 +++++++++++++++++--
 2 files changed, 41 insertions(+), 2 deletions(-)
 create mode 100644 contrib/mw-to-git/GitMediawiki.pm

diff --git a/contrib/mw-to-git/GitMediawiki.pm b/contrib/mw-to-git/GitMediawiki.pm
new file mode 100644
index 0000000..8a0ffc7
--- /dev/null
+++ b/contrib/mw-to-git/GitMediawiki.pm
@@ -0,0 +1,24 @@
+package GitMediawiki;
+
+use 5.008;
+use strict;
+use Git;
+
+BEGIN {
+
+our ($VERSION, @ISA, @EXPORT, @EXPORT_OK);
+
+# Totally unstable API.
+$VERSION = '0.01';
+
+require Exporter;
+
+@ISA = qw(Exporter);
+
+@EXPORT = ();
+
+# Methods which can be called as standalone functions as well:
+@EXPORT_OK = ();
+}
+
+1; # Famous last words
\ No newline at end of file
diff --git a/contrib/mw-to-git/Makefile b/contrib/mw-to-git/Makefile
index f149719..fe30e7f 100644
--- a/contrib/mw-to-git/Makefile
+++ b/contrib/mw-to-git/Makefile
@@ -4,14 +4,29 @@
 #
 ## Build git-remote-mediawiki
 
+GIT_MEDIAWIKI_PM=GitMediawiki.pm
 SCRIPT_PERL=git-remote-mediawiki.perl
 GIT_ROOT_DIR=../..
 HERE=contrib/mw-to-git/
 
 SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
+INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
+                -s --no-print-directory instlibdir)
 
 all: build
 
-build install clean:
+install_pm:
+	cp $(GIT_MEDIAWIKI_PM) $(INSTLIBDIR)
+
+build:
+	$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=$(SCRIPT_PERL_FULL) \
+                build-perl-script
+
+install: install_pm
+	$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=$(SCRIPT_PERL_FULL) \
+                install-perl-script
+
+clean:
 	$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=$(SCRIPT_PERL_FULL) \
-                $@-perl-script
+                clean-perl-script
+	rm $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)
\ No newline at end of file
-- 
1.8.3.GIT

  reply	other threads:[~2013-06-13 10:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-13 10:07 [PATCH/RFC V2 0/4] git-remote-mediawiki: new tool to preview local changes without pushing benoit.person
2013-06-13 10:07 ` benoit.person [this message]
2013-06-13 11:44   ` [PATCH/RFC 1/4] git-mw: Introduction of GitMediawiki.pm Matthieu Moy
2013-06-13 10:07 ` [PATCH/RFC 2/4] git-mw: Moving some functions from git-remote-mediawiki.perl to GitMediawiki.pm benoit.person
2013-06-13 10:07 ` [PATCH/RFC 3/4] git-mw: Adding git-mw.perl script benoit.person
2013-06-13 13:01   ` Matthieu Moy
2013-06-15 13:22     ` Benoît Person
2013-06-16 19:59       ` Matthieu Moy
2013-06-24 14:26   ` Matthieu Moy
2013-06-24 16:38     ` Junio C Hamano
2013-06-24 16:56       ` Matthieu Moy
2013-06-24 17:00         ` Jeff King
2013-06-24 17:05         ` Benoit Person
2013-06-24 17:23         ` Junio C Hamano
2013-06-13 10:07 ` [PATCH/RFC 4/4] git-mw: Adding preview tool in git-mw.perl benoit.person
2013-06-13 12:13   ` Matthieu Moy
2013-06-13 11:23 ` [PATCH/RFC V2 0/4] git-remote-mediawiki: new tool to preview local changes without pushing Matthieu Moy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1371118039-18925-2-git-send-email-benoit.person@ensimag.fr \
    --to=benoit.person@ensimag.fr \
    --cc=celestin.matte@ensimag.fr \
    --cc=git@vger.kernel.org \
    --cc=matthieu.moy@grenoble-inp.fr \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).