Navigation Menu

Skip to content

Commit

Permalink
Support debug build by "make DEBUG=1"
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 12, 2015
1 parent 7a65918 commit 77f094c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Expand Up @@ -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)
2 changes: 2 additions & 0 deletions pgroonga.c
Expand Up @@ -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)
{
Expand All @@ -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)
Expand Down

0 comments on commit 77f094c

Please sign in to comment.