openbsd-ports/databases/redis/patches/patch-src_Makefile
2011-09-23 08:14:23 +00:00

73 lines
2.5 KiB
Plaintext

$OpenBSD: patch-src_Makefile,v 1.3 2011/09/23 08:14:23 dcoppa Exp $
--- src/Makefile.orig Fri Sep 23 09:55:45 2011
+++ src/Makefile Fri Sep 23 09:58:49 2011
@@ -4,7 +4,7 @@
release_hdr := $(shell sh -c './mkreleasehdr.sh')
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
-OPTIMIZATION?=-O2
+# OPTIMIZATION?=-O2
CCCOLOR="\033[34m"
LINKCOLOR="\033[34;1m"
@@ -25,7 +25,7 @@ ifeq ($(uname_S),SunOS)
else
CFLAGS?= -std=c99 -pedantic $(OPTIMIZATION) -Wall -W $(ARCH) $(PROF)
CCLINK?= -lm -pthread
- DEBUG?= -g -rdynamic -ggdb
+# DEBUG?= -g -rdynamic -ggdb
endif
ifeq ($(USE_TCMALLOC),yes)
@@ -34,10 +34,14 @@ ifeq ($(USE_TCMALLOC),yes)
endif
CCOPT= $(CFLAGS) $(ARCH) $(PROF)
-PREFIX= /usr/local
+PREFIX?= /usr/local
INSTALL_BIN= $(PREFIX)/bin
INSTALL= cp -p
+ifndef INSTALL_DIR
+ INSTALL_DIR= mkdir -p
+endif
+
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 networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o vm.o pubsub.o multi.o debug.o sort.o intset.o syncio.o slowlog.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 release.o
@@ -124,16 +128,13 @@ zipmap.o: zipmap.c zmalloc.h
zmalloc.o: zmalloc.c config.h zmalloc.h
dependencies:
- @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)hiredis$(ENDCOLOR)
cd ../deps/hiredis && $(MAKE) static ARCH="$(ARCH)"
- @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)linenoise$(ENDCOLOR)
cd ../deps/linenoise && $(MAKE) ARCH="$(ARCH)"
redis-server: $(OBJ)
$(QUIET_LINK)$(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ) $(CCLINK)
redis-benchmark: dependencies $(BENCHOBJ)
- @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)hiredis$(ENDCOLOR)
cd ../deps/hiredis && $(MAKE) static ARCH="$(ARCH)"
$(QUIET_LINK)$(CC) -o $(BENCHPRGNAME) $(CCOPT) $(DEBUG) $(BENCHOBJ) ../deps/hiredis/libhiredis.a $(CCLINK)
@@ -162,7 +163,7 @@ dep:
$(CC) -MM *.c -I ../deps/hiredis -I ../deps/linenoise
test: redis-server
- (cd ..; tclsh8.5 tests/test_helper.tcl --tags "${TAGS}" --file "${FILE}")
+ (cd ..; ulimit -Sn 192; ${TCL_BIN} tests/test_helper.tcl --tags "${TAGS}" --file "${FILE}")
bench:
./redis-benchmark
@@ -189,7 +190,7 @@ noopt:
$(MAKE) PROF="-pg" ARCH="-arch i386"
install: all
- mkdir -p $(INSTALL_BIN)
+ $(INSTALL_DIR) $(INSTALL_BIN)
$(INSTALL) $(PRGNAME) $(INSTALL_BIN)
$(INSTALL) $(BENCHPRGNAME) $(INSTALL_BIN)
$(INSTALL) $(CLIPRGNAME) $(INSTALL_BIN)