author | Lars Hjemli <hjemli@gmail.com> | 2008-03-24 22:10:59 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2008-03-24 22:27:16 (UTC) |
commit | 92908af4558d7362c7deeb05254343a5a5f11a05 (patch) (side-by-side diff) | |
tree | 6913a6f567375446fb680bc7e94dbabb5d8e496d | |
parent | df90b51bafec24336cf30339b2978ff6df22b075 (diff) | |
download | cgit-92908af4558d7362c7deeb05254343a5a5f11a05.zip cgit-92908af4558d7362c7deeb05254343a5a5f11a05.tar.gz cgit-92908af4558d7362c7deeb05254343a5a5f11a05.tar.bz2 |
Move cgit_version from shared.c to cgit.c
With the matching Makefile change, this makes sure that only cgit.o and cgit
proper needs to be rebuildt when VERSION has been modified.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | cgit.c | 2 | ||||
-rw-r--r-- | shared.c | 2 |
3 files changed, 5 insertions, 3 deletions
@@ -61,17 +61,19 @@ CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"' CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"' CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"' CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"' cgit: $(OBJECTS) $(CC) $(CFLAGS) -o cgit $(OBJECTS) $(EXTLIBS) -$(OBJECTS): git/xdiff/lib.a git/libgit.a VERSION +$(OBJECTS): git/xdiff/lib.a git/libgit.a + +cgit.o: VERSION -include $(OBJECTS:.o=.d) git/xdiff/lib.a: | git git/libgit.a: | git git: @@ -5,16 +5,18 @@ * Licensed under GNU General Public License v2 * (see COPYING for full license text) */ #include "cgit.h" #include "cmd.h" #include "ui-shared.h" +const char *cgit_version = CGIT_VERSION; + void config_cb(const char *name, const char *value) { if (!strcmp(name, "root-title")) ctx.cfg.root_title = xstrdup(value); else if (!strcmp(name, "css")) ctx.cfg.css = xstrdup(value); else if (!strcmp(name, "logo")) ctx.cfg.logo = xstrdup(value); @@ -7,18 +7,16 @@ */ #include "cgit.h" struct cgit_repolist cgit_repolist; struct cgit_context ctx; int cgit_cmd; -const char *cgit_version = CGIT_VERSION; - int chk_zero(int result, char *msg) { if (result != 0) die("%s: %s", msg, strerror(errno)); return result; } int chk_positive(int result, char *msg) |