summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2012-09-08 19:20:39 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2012-09-08 19:20:39 +0100
commit8d03cfc784b8b168d9910df456d6794df53b561f (patch)
treeac8c9525fb9a83ffdf0bb29e84747f1b663cd87d
parent03d61075b0f82159d92e7a1022396da67d4e4720 (diff)
downloadgall-8d03cfc784b8b168d9910df456d6794df53b561f.tar.gz
Update libgit2 and make gall.git2 module
-rw-r--r--.gitignore1
-rw-r--r--Makefile28
-rw-r--r--README4
m---------libgit20
4 files changed, 29 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 6556034..cc2e872 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
luacov.*.out
test/test_repo
+lib/gall/git2.so
diff --git a/Makefile b/Makefile
index 01985be..dffc489 100644
--- a/Makefile
+++ b/Makefile
@@ -17,8 +17,32 @@ install:
LUA := LUA_PATH="$(shell pwd)/lib/?.lua;$(shell pwd)/extras/luacov/src/?.lua;;" lua$(LUA_VER)
+cmodule: try-cmodule
+
+try-cmodule:
+ -@$(MAKE) --no-print-directory do-cmodule
+
+do-cmodule: lib/gall/git2.so
+
+lib/gall/git2.so: luagit2/build/git2.so
+ cp $< $@
+
+luagit2/build/git2.so: libgit2/build/gall-install-stamp
+ mkdir -p luagit2/build
+ cd luagit2/build && PKG_CONFIG_PATH="$(shell pwd)/libgit2/build/gall-install/lib/pkgconfig:$(PKG_CONFIG_PATH)" cmake -DCMAKE_C_FLAGS="$${CMAKE_C_FLAGS} -Dluaopen_git2=luaopen_gall_git2" -DCMAKE_MODULE_LINKER_FLAGS="-lssl" ..
+ cd luagit2/build && $(MAKE)
+
+libgit2/build/gall-install-stamp:
+ mkdir -p libgit2/build
+ cd libgit2/build && cmake -DBUILD_SHARED_LIBS:BOOLEAN=OFF -DCMAKE_INSTALL_PREFIX:PATH=$(shell pwd)/libgit2/build/gall-install ..
+ cd libgit2/build && $(MAKE)
+ cd libgit2/build && $(MAKE) test
+ cd libgit2/build && $(MAKE) install
+ touch $@
+
clean:
- $(RM) luacov.report.out luacov.stats.out
+ $(RM) luacov.report.out luacov.stats.out lib/gall/git2.so
+ $(RM) -r libgit2/build luagit2/build
distclean: clean
find . -name "*~" -delete
@@ -28,7 +52,7 @@ example:
$(LUA) example/gall-example.lua
.PHONY: test
-test:
+test: cmodule
@$(RM) luacov.stats.out
@ERR=0; \
for MOD in $(sort $(MODULES)); do \
diff --git a/README b/README
index 03851f3..351d4e6 100644
--- a/README
+++ b/README
@@ -7,8 +7,8 @@ to run external programs and direct access via [luagit2].
In order to make the [luagit2] binding marginally more stable for Gall, it
includes both [luagit2] and [libgit2] via submodules and builds them statically
-together into a git2 module which it installs as gall.internal.git2 so that if
-the system has a git2 module, it won't affect Gall's specific interfaced one.
+together into a git2 module which it installs as gall.git2 so that if the
+system has a git2 module, it won't affect Gall's specific interfaced one.
For examples of how to use Gall, see the `examples/` directory.
diff --git a/libgit2 b/libgit2
-Subproject 17b06f4d47bfd9fae8073c85d71751df94e5005
+Subproject 056f1b23599891fced002d18d716bdfdb7b8f15