changeset 656:73ebc5c43231

build a native pg_config in package postgresql
author Volker Grabsch <vog@notjusthosting.com>
date Fri, 22 Jan 2010 02:54:38 +0100
parents 563b1e2827ce
children b1d03b91eb1e
files src/postgresql.mk
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/postgresql.mk	Fri Jan 22 02:25:15 2010 +0100
+++ b/src/postgresql.mk	Fri Jan 22 02:54:38 2010 +0100
@@ -56,4 +56,17 @@
     $(MAKE) -C '$(1)'/src/bin/psql         -j '$(JOBS)' install haslibarule= shlib=
     $(INSTALL) -m664 '$(1)/src/include/pg_config.h'    '$(PREFIX)/$(TARGET)/include/'
     $(INSTALL) -m664 '$(1)/src/include/postgres_ext.h' '$(PREFIX)/$(TARGET)/include/'
+    # Build a native pg_config.
+    echo '/* empty */' >'$(1)'/src/include/pg_config_os.h
+    gcc \
+        -I'$(1)'/src/include \
+        -DFRONTEND \
+        '$(1)'/src/port/snprintf.c \
+        '$(1)'/src/port/path.c \
+        '$(1)'/src/port/strlcat.c \
+        '$(1)'/src/port/strlcpy.c \
+        '$(1)'/src/port/thread.c \
+        '$(1)'/src/port/exec.c \
+        '$(1)'/src/bin/pg_config/pg_config.c \
+        -o '$(PREFIX)/$(TARGET)'/bin/pg_config
 endef