pgxs may not define FLEX/BISON
authorMarko Kreen <markokr@gmail.com>
Tue, 23 Sep 2008 13:58:33 +0000 (13:58 +0000)
committerMarko Kreen <markokr@gmail.com>
Tue, 23 Sep 2008 13:58:33 +0000 (13:58 +0000)
Makefile

index dcc0b4ec9d58444948c40443090d108a1d51e84d..118e0ea30ca56486bb56f95d88c28085e4e3ab2c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,9 +6,6 @@ PLPROXY_VERSION = 2.0.7
 PQINC = $(shell pg_config --includedir)
 PQLIB = $(shell pg_config --libdir)
 
-FLEX = flex
-BISON = bison 
-
 # module setup
 MODULE_big = plproxy
 SRCS = src/cluster.c src/execute.c src/function.c src/main.c \
@@ -43,6 +40,10 @@ ifeq ($(PORTNAME), win32)
 SHLIB_LINK += -lws2_32 -lpgport
 endif
 
+# PGXS may define them as empty
+FLEX := $(or $(FLEX), flex)
+BISON := $(or $(BISON), bison)
+
 # parser rules
 src/scanner.o: src/parser.tab.h
 src/parser.tab.h: src/parser.tab.c