aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cgit.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/cgit.mk b/cgit.mk
index 4869c55..c8ecd3a 100644
--- a/cgit.mk
+++ b/cgit.mk
@@ -15,7 +15,6 @@ $(CGIT_PREFIX)VERSION: force-version
15 15
16# CGIT_CFLAGS is a separate variable so that we can track it separately 16# CGIT_CFLAGS is a separate variable so that we can track it separately
17# and avoid rebuilding all of Git when these variables change. 17# and avoid rebuilding all of Git when these variables change.
18CGIT_CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"'
19CGIT_CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"' 18CGIT_CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"'
20CGIT_CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"' 19CGIT_CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"'
21CGIT_CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"' 20CGIT_CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"'
@@ -53,6 +52,14 @@ CGIT_OBJ_NAMES += vector.o
53 52
54CGIT_OBJS := $(addprefix $(CGIT_PREFIX),$(CGIT_OBJ_NAMES)) 53CGIT_OBJS := $(addprefix $(CGIT_PREFIX),$(CGIT_OBJ_NAMES))
55 54
55# Only cgit.c reference CGIT_VERSION so we only rebuild its objects when the
56# version changes.
57CGIT_VERSION_OBJS := $(addprefix $(CGIT_PREFIX),cgit.o)
58$(CGIT_VERSION_OBJS): $(CGIT_PREFIX)VERSION
59$(CGIT_VERSION_OBJS): EXTRA_CPPFLAGS = \
60 -DCGIT_VERSION='"$(CGIT_VERSION)"'
61
62
56ifeq ($(wildcard $(CGIT_PREFIX).depend),) 63ifeq ($(wildcard $(CGIT_PREFIX).depend),)
57missing_dep_dirs += $(CGIT_PREFIX).depend 64missing_dep_dirs += $(CGIT_PREFIX).depend
58endif 65endif