diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-09-08 20:09:33 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-09-08 20:09:33 +0100 |
commit | f0613b4cc5763d3de7dd65b89e6b4f9d3c6e6190 (patch) | |
tree | a5843b2cc60ead660dd2dd424c07600737b20eed /Makefile | |
parent | 8d03cfc784b8b168d9910df456d6794df53b561f (diff) | |
download | gall-f0613b4cc5763d3de7dd65b89e6b4f9d3c6e6190.tar.gz |
GALL: Allow for optional git2 support
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -15,21 +15,22 @@ install: cp lib/$${MOD} $(INST_ROOT)/$${MOD}; \ done -LUA := LUA_PATH="$(shell pwd)/lib/?.lua;$(shell pwd)/extras/luacov/src/?.lua;;" lua$(LUA_VER) +LUA := LUA_CPATH="$(shell pwd)/lib/?.so;;" 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 +do-cmodule: lib/gall/ll/git2.so -lib/gall/git2.so: luagit2/build/git2.so +lib/gall/ll/git2.so: luagit2/build/git2.so + mkdir -p lib/gall/ll 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 && 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_ll_git2" -DCMAKE_MODULE_LINKER_FLAGS="-lssl" .. cd luagit2/build && $(MAKE) libgit2/build/gall-install-stamp: @@ -41,8 +42,8 @@ libgit2/build/gall-install-stamp: touch $@ clean: - $(RM) luacov.report.out luacov.stats.out lib/gall/git2.so - $(RM) -r libgit2/build luagit2/build + $(RM) luacov.report.out luacov.stats.out + $(RM) -r libgit2/build luagit2/build lib/gall/ll distclean: clean find . -name "*~" -delete @@ -59,6 +60,9 @@ test: cmodule echo -n "$${MOD}: "; \ $(LUA) test/test-$${MOD}.lua; \ test "x$$?" = "x0" || ERR=1; \ + echo -n "$${MOD} [no git2]: "; \ + GALL_DISABLE_GIT2=1 $(LUA) test/test-$${MOD}.lua; \ + test "x$$?" = "x0" || ERR=1; \ done; \ $(LUA) extras/luacov/src/bin/luacov -X luacov. -X test. $(MODULES); \ exit $$ERR |