Commit 1cfb0ff4b6193c409e846a5992683559afd4be07

Ramsay Jones 2009-12-30T19:12:35

Makefile: Add some missing $(GIT_LIB) dependencies Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>

diff --git a/Makefile b/Makefile
index b6d1b7d..bd0d32c 100644
--- a/Makefile
+++ b/Makefile
@@ -127,7 +127,7 @@ $(GIT_LIB): $(OBJS)
 	$(AR) $(GIT_LIB) $(OBJS)
 	$(RANLIB) $(GIT_LIB)
 
-$(TEST_OBJ) $(TEST_EXE) $(TEST_RUN) $(TEST_VAL):
+$(TEST_OBJ) $(TEST_EXE) $(TEST_RUN) $(TEST_VAL): $(GIT_LIB)
 	@$(MAKE) -C tests --no-print-directory \
 		OS=$(OS) NO_OPENSSL=$(NO_OPENSSL) $(@F)
 
diff --git a/tests/Makefile b/tests/Makefile
index 8fac94d..6bdfcbc 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -22,6 +22,8 @@ ifneq (,$(findstring MINGW,$(uname_S)))
 	EXTRA_LIBS += -lwsock32 -lpthread
 endif
 
+GIT_LIB = ../libgit2.a
+
 HDRS = $(wildcard ../src/*.h)
 PUBLIC_HEADERS = $(wildcard ../src/git/*.h)
 HDRS += $(PUBLIC_HEADERS)
@@ -81,6 +83,7 @@ $(patsubst %.exe,%_main.o,$(TEST_EXE)): %_main.o: %.toc
 		-o $@
 
 $(TEST_EXE): %.exe: $(T_LIB)
+$(TEST_EXE): %.exe: $(GIT_LIB)
 $(TEST_EXE): %.exe: %.o %_main.o
 	$(LD) -o $@ \
 		$(patsubst %.exe,%_main.o,$@) \