mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 08:08:53 -05:00
hopefully faster recompiling with a trick
This commit is contained in:
parent
bb039e853d
commit
7c4fc71c15
11
Makefile
11
Makefile
@ -15,7 +15,7 @@ endif
|
||||
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
|
||||
@ -37,12 +37,10 @@ ae_kqueue.o: ae_kqueue.c
|
||||
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
|
||||
@ -50,10 +48,13 @@ redis-check-dump.o: redis-check-dump.c lzf.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)
|
||||
|
8
redis.c
8
redis.c
@ -575,6 +575,8 @@ typedef struct iojob {
|
||||
} iojob;
|
||||
|
||||
/*================================ Prototypes =============================== */
|
||||
char *redisGitSHA1(void);
|
||||
char *redisGitDirty(void);
|
||||
|
||||
static void freeStringObject(robj *o);
|
||||
static void freeListObject(robj *o);
|
||||
@ -7760,8 +7762,8 @@ static sds genRedisInfoString(void) {
|
||||
"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(),
|
||||
@ -11442,7 +11444,7 @@ static void daemonize(void) {
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
13
release.c
Normal file
13
release.c
Normal file
@ -0,0 +1,13 @@
|
||||
/* 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user