]> git.cameronkatri.com Git - cgit.git/commitdiff
Move cgit_version from shared.c to cgit.c
authorLars Hjemli <hjemli@gmail.com>
Mon, 24 Mar 2008 22:10:59 +0000 (23:10 +0100)
committerLars Hjemli <hjemli@gmail.com>
Mon, 24 Mar 2008 22:27:16 +0000 (23:27 +0100)
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>
Makefile
cgit.c
shared.c

index faf7b98ae8b658af4af1a6b3326f7af6a95ef45f..c9be8fa0abc0a0b25b5328e1e12f1f03d7a45bcb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -66,7 +66,9 @@ 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)
 
diff --git a/cgit.c b/cgit.c
index b3dd1199c87baa72c5eec2de450f60bc8a90837e..3943a0f8ab3ed143d8492f6ee7ba8b3450ec4ee1 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -10,6 +10,8 @@
 #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"))
index cd60da513daaecf085cf81b793f01628d5a9edf1..48002accd987129bb72f62b9fc0b5d6a05bcf174 100644 (file)
--- a/shared.c
+++ b/shared.c
@@ -12,8 +12,6 @@ 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)