git » nmdb » commit b450b7c

Make nmdb's Makefile gmake 3.80 compatible.

author Alberto Bertogli
2007-08-09 07:08:16 UTC
committer Alberto Bertogli
2007-08-09 07:08:16 UTC
parent d139ab25de20ec7e8e9a29c8f9e424eb166b590c

Make nmdb's Makefile gmake 3.80 compatible.

Using "else ifeq" (on the same line) is only accepted in gmake 3.81 or
newer, not on earlier versions. This patch gets rid of it entirely by
using a series of ifeq-endif.

Signed-off-by: Alberto Bertogli <albertito@gmail.com>

nmdb/Makefile +7 -2

diff --git a/nmdb/Makefile b/nmdb/Makefile
index 97fe2de..4b1c90a 100644
--- a/nmdb/Makefile
+++ b/nmdb/Makefile
@@ -48,15 +48,20 @@ else
 	OBJS += udp-stub.o
 endif
 
+# Use series of ifeq-endif instead of else-ifeq because otherwise the nesting
+# is a mess. Using "else ifeq ..." in the same line is only supported from
+# gmake 3.81, which is too new.
 ifeq ($(BACKEND), qdbm)
 	OBJS += be-qdbm.o
 	ALL_CFLAGS += -DBACKEND_QDBM
 	LIBS += -lqdbm
-else ifeq ($(BACKEND), bdb)
+endif
+ifeq ($(BACKEND), bdb)
 	OBJS += be-bdb.o
 	ALL_CFLAGS += -DBACKEND_BDB
 	LIBS += -ldb
-else ifeq ($(BACKEND), null)
+endif
+ifeq ($(BACKEND), null)
 	OBJS += be-null.o
 	ALL_CFLAGS += -DBACKEND_NULL
 endif