More portable workaround for empty FLEX/BISON
authorMarko Kreen <markokr@gmail.com>
Wed, 1 Dec 2010 10:23:47 +0000 (12:23 +0200)
committerMarko Kreen <markokr@gmail.com>
Wed, 1 Dec 2010 10:23:47 +0000 (12:23 +0200)
The $(or ) does not work on older gnu makes, $(if )
is more portable.

Suggested by Peter Eisentraut

Makefile

index 48029b436c92da0b40aafd2f6c2301de258283b0..30583a697e984e46d05df2fe44292d5c5952b501 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -59,8 +59,8 @@ SHLIB_LINK += -lws2_32 -lpgport
 endif
 
 # PGXS may define them as empty
-FLEX := $(or $(FLEX), flex)
-BISON := $(or $(BISON), bison)
+FLEX := $(if $(FLEX),$(FLEX),flex)
+BISON := $(if $(BISON),$(BISON),bison)
 
 # parser rules
 src/scanner.o: src/parser.tab.h