From da8b899d6c90f184707ebe39d4a260de94cabff6 Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Mon, 28 Feb 2000 23:28:41 +0000
Subject: [PATCH] Update ecpg to use snprintf

---
 src/GNUmakefile.in                                    | 3 ++-
 src/configure.in                                      | 1 +
 src/interfaces/ecpg/preproc/{Makefile => Makefile.in} | 7 +++++++
 3 files changed, 10 insertions(+), 1 deletion(-)
 rename src/interfaces/ecpg/preproc/{Makefile => Makefile.in} (90%)

diff --git a/src/GNUmakefile.in b/src/GNUmakefile.in
index ea65315199c..263cadadb48 100644
--- a/src/GNUmakefile.in
+++ b/src/GNUmakefile.in
@@ -7,7 +7,7 @@
 #
 #
 # IDENTIFICATION
-#    $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.49 2000/01/20 21:50:56 petere Exp $
+#    $Header: /cvsroot/pgsql/src/Attic/GNUmakefile.in,v 1.50 2000/02/28 23:28:40 momjian Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -86,6 +86,7 @@ distclean: clean
 		include/version.h \
 		interfaces/libpq/Makefile \
 		interfaces/ecpg/lib/Makefile \
+		interfaces/ecpg/preproc/Makefile \
 		interfaces/libpq++/Makefile \
 		interfaces/libpgeasy/Makefile \
 		interfaces/libpgtcl/Makefile \
diff --git a/src/configure.in b/src/configure.in
index 5a5e3cf6da5..fc91938220e 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -1289,6 +1289,7 @@ AC_OUTPUT(
 	include/version.h
 	interfaces/libpq/Makefile
 	interfaces/ecpg/lib/Makefile
+	interfaces/ecpg/preproc/Makefile
 	interfaces/libpq++/Makefile
 	interfaces/libpgeasy/Makefile
 	interfaces/libpgtcl/Makefile
diff --git a/src/interfaces/ecpg/preproc/Makefile b/src/interfaces/ecpg/preproc/Makefile.in
similarity index 90%
rename from src/interfaces/ecpg/preproc/Makefile
rename to src/interfaces/ecpg/preproc/Makefile.in
index 3fa7307de21..d97a0717a95 100644
--- a/src/interfaces/ecpg/preproc/Makefile
+++ b/src/interfaces/ecpg/preproc/Makefile.in
@@ -14,6 +14,13 @@ OBJ=preproc.o pgc.o type.o ecpg.o ecpg_keywords.o output.o\
 
 all:: ecpg
 
+ifneq (@SNPRINTF@,)
+OBJS+=$(SRCDIR)/backend/port/snprintf.o
+
+$(SRCDIR)/backend/port/snprintf.o:
+	$(MAKE) -C $(SRCDIR)/backend/port snprintf.o
+endif
+
 # Rule that really do something.
 ecpg: $(OBJ)
 	$(CC) -o ecpg $(OBJ) $(LEXLIB) $(LDFLAGS)
-- 
GitLab