about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJohn Keeping2013-05-18 15:17:08 +0100
committerJason A. Donenfeld2013-05-22 12:53:06 +0200
commitc2b79dd8e0020c1c10b61fa1a6c58afd53738c85 (patch)
treee9bef2f5988ce20327a6f8ad18dda4de42c80212
parentcache.c: fix cache_ls (diff)
downloadcgit-c2b79dd8e0020c1c10b61fa1a6c58afd53738c85.tar.gz
cgit-c2b79dd8e0020c1c10b61fa1a6c58afd53738c85.zip
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
64all:: cgit 64all:: cgit
65 65
66cgit: 66cgit:
67 $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) -f ../cgit.mk ../cgit NO_CURL=1 67 $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) -f ../cgit.mk ../cgit $(EXTRA_GIT_TARGETS) NO_CURL=1
68 68
69git: 69test:
70 $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 70 @$(MAKE) --no-print-directory cgit EXTRA_GIT_TARGETS=all
71
72test: all git
73 $(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all 71 $(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all
74 72
75install: all 73install: all