summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2010-05-18 00:36:48 +0200
committerantirez <antirez@gmail.com>2010-05-18 00:36:48 +0200
commit73287b2b576fa6a1ff1b61467286cbd5458881d2 (patch)
tree48ecb7bb09f2e0dd4bf2ea8b581dca8afd8659d1 /Makefile
parent5436146c8dcd95c5ef3809f2830fb9c08edc4177 (diff)
downloadredis-73287b2b576fa6a1ff1b61467286cbd5458881d2.tar.gz
buliding of release.h moved into an external script. Avoided recompialtion of redis.c if git sha1 is the same as the previous one
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 2 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 635cb1893..949f0b0c0 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,7 @@
# Copyright (C) 2009 Salvatore Sanfilippo <antirez at gmail dot com>
# This file is released under the BSD license, see the COPYING file
+release_hdr := $(shell sh -c './mkreleasehdr.sh')
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
OPTIMIZATION?=-O2
ifeq ($(uname_S),SunOS)
@@ -14,8 +15,6 @@ endif
CCOPT= $(CFLAGS) $(CCLINK) $(ARCH) $(PROF)
DEBUG?= -g -rdynamic -ggdb
-GIT_SHA1:=$(shell sh -c '(git show-ref --head --hash=8 2> /dev/null || echo 00000000) | head -n1')
-GIT_DIRTY:=$(shell sh -c 'git status -s 2> /dev/null | wc -l')
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
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
@@ -56,7 +55,7 @@ sds.o: sds.c sds.h zmalloc.h
zipmap.o: zipmap.c zmalloc.h
zmalloc.o: zmalloc.c config.h
-redis-server: releaseheader $(OBJ)
+redis-server: $(OBJ)
$(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ)
@echo ""
@echo "Hint: To run the test-redis.tcl script is a good idea."
@@ -76,11 +75,6 @@ redis-check-dump: $(CHECKDUMPOBJ)
redis-check-aof: $(CHECKAOFOBJ)
$(CC) -o $(CHECKAOFPRGNAME) $(CCOPT) $(DEBUG) $(CHECKAOFOBJ)
-releaseheader:
- @echo "#define REDIS_GIT_SHA1 \"$(GIT_SHA1)\"" > release.h
- @echo "#define REDIS_GIT_DIRTY $(GIT_DIRTY)" >> release.h
- @touch redis.c # force recompile of redis.c
-
.c.o:
$(CC) -c $(CFLAGS) $(DEBUG) $(COMPILE_TIME) $<