diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 28 | ||||
-rw-r--r-- | README | 4 | ||||
m--------- | libgit2 | 0 |
4 files changed, 29 insertions, 4 deletions
@@ -2,3 +2,4 @@ luacov.*.out test/test_repo +lib/gall/git2.so @@ -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 \ @@ -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 |