cgit

commit 898f5f89d3e2c6100f7e0ab6fc4a200b8fc75bb5

Author: Chris Pickel <sfiera@macports.org>

Make cgit honor CACHE_ROOT as defined in Makefile

Signed-off-by: Lars Hjemli <hjemli@gmail.com>

 Makefile | 1 +
 shared.c | 2 +-


diff --git a/Makefile b/Makefile
index d95a5a3129ac2b967befdd45f77a7648c0eb3857..7857b8ea11586a792eda921e404d3f109b0d40f7 100644
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,7 @@ CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)'
 CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"'
 CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"'
 CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"'
+CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"'
 
 
 cgit: cgit.c $(OBJECTS)




diff --git a/shared.c b/shared.c
index cd9d68d24af2682d000dafec06ca5244b42c3d69..1cd60a2d6b00b97f292b6ee306256358287f95ab 100644
--- a/shared.c
+++ b/shared.c
@@ -23,7 +23,7 @@ char *cgit_module_link  = "./?repo=%s&page=commit&id=%s";
 char *cgit_agefile      = "info/web/last-modified";
 char *cgit_virtual_root = NULL;
 char *cgit_script_name  = CGIT_SCRIPT_NAME;
-char *cgit_cache_root   = "/var/cache/cgit";
+char *cgit_cache_root   = CGIT_CACHE_ROOT;
 char *cgit_repo_group   = NULL;
 
 int cgit_nocache               =  0;