summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2013-05-18 15:17:08 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2013-05-18 17:03:00 +0200
commitfd0138e2b1772dfc8be3d43e734e553847c737ec (patch)
tree541b059010e16f83be2514c67fd2ea9305c9e4cd
parent7966fd9b8e32562196b52abd32f6ba1e15228b81 (diff)
downloadcgit-fd0138e2b1772dfc8be3d43e734e553847c737ec.tar.gz
Makefile: fix parallel "make test"
When building the "test" target we depend on both cgit and building the Git tools. By doing this with two targets we end up running make in the git/ directory twice, concurrently if using parallel make, which causes us to build more than we need and potentially builds incorrectly if multi-step build-then-move operations overlap. Fix this by instead calling back into the makefile so that we alter the "cgit" target to also build the Git tools. Signed-off-by: John Keeping <john@keeping.me.uk>
-rw-r--r--Makefile8
1 files changed, 3 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 77c676d..0fe0bc2 100644
--- a/Makefile
+++ b/Makefile
@@ -64,12 +64,10 @@ endif
all:: cgit
cgit:
- $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) -f ../cgit.mk ../cgit NO_CURL=1
+ $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) -f ../cgit.mk ../cgit $(EXTRA_GIT_TARGETS) NO_CURL=1
-git:
- $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1
-
-test: all git
+test:
+ @$(MAKE) --no-print-directory cgit EXTRA_GIT_TARGETS=all
$(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all
install: all