CCOPT= $(CFLAGS) $(CCLINK) $(ARCH) $(PROF)
DEBUG?= -g -rdynamic -ggdb
-OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o
+OBJ = adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o
BENCHOBJ = ae.o anet.o redis-benchmark.o sds.o adlist.o zmalloc.o
CLIOBJ = anet.o sds.o adlist.o redis-cli.o zmalloc.o linenoise.o
CHECKDUMPOBJ = redis-check-dump.o lzf_c.o lzf_d.o
ae_select.o: ae_select.c
anet.o: anet.c fmacros.h anet.h
dict.o: dict.c fmacros.h dict.h zmalloc.h
-dict2.o: dict2.c fmacros.h dict2.h zmalloc.h
linenoise.o: linenoise.c fmacros.h
lzf_c.o: lzf_c.c lzfP.h
lzf_d.o: lzf_d.c lzfP.h
pqsort.o: pqsort.c
-printraw.o: printraw.c
redis-benchmark.o: redis-benchmark.c fmacros.h ae.h anet.h sds.h adlist.h \
zmalloc.h
redis-check-aof.o: redis-check-aof.c fmacros.h config.h
redis-cli.o: redis-cli.c fmacros.h anet.h sds.h adlist.h zmalloc.h \
linenoise.h
redis.o: redis.c fmacros.h config.h redis.h ae.h sds.h anet.h dict.h \
- adlist.h zmalloc.h lzf.h pqsort.h zipmap.h staticsymbols.h sha1.h
+ adlist.h zmalloc.h lzf.h pqsort.h zipmap.h ziplist.h sha1.h release.h \
+ staticsymbols.h
+release.o: release.c release.h
sds.o: sds.c sds.h zmalloc.h
+sha1.o: sha1.c sha1.h
+ziplist.o: ziplist.c zmalloc.h ziplist.h
zipmap.o: zipmap.c zmalloc.h
-ziplist.o: ziplist.c zmalloc.h
zmalloc.o: zmalloc.c config.h
redis-server: $(OBJ)
} iojob;
/*================================ Prototypes =============================== */
+char *redisGitSHA1(void);
+char *redisGitDirty(void);
static void freeStringObject(robj *o);
static void freeListObject(robj *o);
"vm_enabled:%d\r\n"
"role:%s\r\n"
,REDIS_VERSION,
- REDIS_GIT_SHA1,
- strtol(REDIS_GIT_DIRTY,NULL,10) > 0,
+ redisGitSHA1(),
+ strtol(redisGitDirty(),NULL,10) > 0,
(sizeof(long) == 8) ? "64" : "32",
aeGetApiName(),
(long) getpid(),
static void version() {
printf("Redis server version %s (%s:%d)\n", REDIS_VERSION,
- REDIS_GIT_SHA1, atoi(REDIS_GIT_DIRTY) > 0);
+ redisGitSHA1(), atoi(redisGitDirty()) > 0);
exit(0);
}
--- /dev/null
+/* Every time the Redis Git SHA1 or Dirty status changes only this file
+ * small file is recompiled, as we access this information in all the other
+ * files using this functions. */
+
+#include "release.h"
+
+char *redisGitSHA1(void) {
+ return REDIS_GIT_SHA1;
+}
+
+char *redisGitDirty(void) {
+ return REDIS_GIT_DIRTY;
+}