summaryrefslogtreecommitdiff
path: root/perl/Makefile.PL
diff options
context:
space:
mode:
authorPetr Baudis <pasky@suse.cz>2006-06-24 02:34:29 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-03 00:14:40 (GMT)
commitb1edc53d062c4f6adae08a15be08d6e7bccd242e (patch)
treeebeb62dc185d65d80d478ae15ceba9fb8788a775 /perl/Makefile.PL
parent35c636ec487d0d5c38e0ce8d3d7bc7ca42c6e5c1 (diff)
downloadgit-b1edc53d062c4f6adae08a15be08d6e7bccd242e.zip
git-b1edc53d062c4f6adae08a15be08d6e7bccd242e.tar.gz
git-b1edc53d062c4f6adae08a15be08d6e7bccd242e.tar.bz2
Introduce Git.pm (v4)
This patch introduces a very basic and barebone Git.pm module with a sketch of how the generic interface would look like; most functions are missing, but this should give some good base. I will continue expanding it. Most desirable now is more careful error reporting, generic_in() for feeding input to Git commands and the repository() constructor doing some poking with git-rev-parse to get the git directory and subdirectory prefix. Those three are basically the prerequisities for converting git-mv. I will send them as follow-ups to this patch. Currently Git.pm just wraps up exec()s of Git commands, but even that is not trivial to get right and various Git perl scripts do it in various inconsistent ways. In addition to Git.pm, there is now also Git.xs which provides barebone Git.xs for directly interfacing with libgit.a, and as an example providing the hash_object() function using libgit. This adds the Git module, integrates it to the build system and as an example converts the git-fmt-merge-msg.perl script to it (the result is not very impressive since its advantage is not quite apparent in this one, but I just picked up the simplest Git user around). Compared to v3, only very minor things were fixed in this patch (some whitespaces, a missing export, tiny bug in git-fmt-merge-msg.perl); at first I wanted to post them as a separate patch but since this is still only in pu, I decided that it will be cleaner to just resend the patch. My current working state is available all the time at http://pasky.or.cz/~xpasky/git-perl/Git.pm and an irregularily updated API documentation is at http://pasky.or.cz/~xpasky/git-perl/Git.html Many thanks to Jakub Narebski, Junio and others for their feedback. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'perl/Makefile.PL')
-rw-r--r--perl/Makefile.PL21
1 files changed, 21 insertions, 0 deletions
diff --git a/perl/Makefile.PL b/perl/Makefile.PL
new file mode 100644
index 0000000..dd61056
--- /dev/null
+++ b/perl/Makefile.PL
@@ -0,0 +1,21 @@
+use ExtUtils::MakeMaker;
+
+sub MY::postamble {
+ return <<'MAKE_FRAG';
+instlibdir:
+ @echo $(INSTALLSITELIB)
+
+MAKE_FRAG
+}
+
+WriteMakefile(
+ NAME => 'Git',
+ VERSION_FROM => 'Git.pm',
+ MYEXTLIB => '../libgit.a',
+ INC => '-I. -I..',
+);
+
+
+use Devel::PPPort;
+
+-s 'ppport.h' or Devel::PPPort::WriteFile();