[Groonga-commit] pgroonga/pgroonga at 77f094c [master] Support debug build by "make DEBUG=1"

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Tue Jan 13 00:14:41 JST 2015


Kouhei Sutou	2015-01-13 00:14:41 +0900 (Tue, 13 Jan 2015)

  New Revision: 77f094c0f161de9ce376cc5b076c7f28ee4052f0
  https://github.com/pgroonga/pgroonga/commit/77f094c0f161de9ce376cc5b076c7f28ee4052f0

  Message:
    Support debug build by "make DEBUG=1"

  Modified files:
    Makefile
    pgroonga.c

  Modified: Makefile (+5 -0)
===================================================================
--- Makefile    2015-01-13 00:03:55 +0900 (d4cb047)
+++ Makefile    2015-01-13 00:14:41 +0900 (ccd0c68)
@@ -7,6 +7,11 @@ PG_CPPFLAGS = $(shell pkg-config --cflags groonga)
 SHLIB_LINK = $(shell pkg-config --libs groonga)
 REGRESS = pgroonga update bench
 
+ifdef DEBUG
+CFLAGS += -O0 -g3 -DPGROONGA_DEBUG=1
+SHLIB_LINK += -Wl,--rpath=$(shell pkg-config --libs-only-L groonga | sed -e 's/^-L//')
+endif
+
 PG_CONFIG = pg_config
 PGXS := $(shell $(PG_CONFIG) --pgxs)
 include $(PGXS)

  Modified: pgroonga.c (+2 -0)
===================================================================
--- pgroonga.c    2015-01-13 00:03:55 +0900 (db058ad)
+++ pgroonga.c    2015-01-13 00:14:41 +0900 (09898c6)
@@ -58,6 +58,7 @@ static grn_ctx *ctx = &grnContext;
 static grn_obj buffer;
 static grn_obj inspectBuffer;
 
+#ifdef PGROONGA_DEBUG
 static const char *
 GrnInspect(grn_obj *object)
 {
@@ -66,6 +67,7 @@ GrnInspect(grn_obj *object)
 	GRN_TEXT_PUTC(ctx, &inspectBuffer, '\0');
 	return GRN_TEXT_VALUE(&inspectBuffer);
 }
+#endif
 
 static grn_encoding
 GrnGetEncoding(void)
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る