comparison src/postgresql.mk @ 3395:1ad098269cfb

postgresql: create and install host pg_config tool. * src/postgresql.mk: install host pg_config tool, use DESTDIR in install.
author John Donoghue <john.donoghue@ieee.org>
date Fri, 03 Jan 2014 18:05:55 -0500
parents 166294cad9f0
children 13be64f9f16d
comparison
equal deleted inserted replaced
3394:83a5cb70a800 3395:1ad098269cfb
12 ifeq ($(MXE_NATIVE_BUILD),yes) 12 ifeq ($(MXE_NATIVE_BUILD),yes)
13 $(PKG)_CONFIGURE_FLAGS_OPTION := $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) 13 $(PKG)_CONFIGURE_FLAGS_OPTION := $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS)
14 endif 14 endif
15 15
16 ifeq ($(MXE_SYSTEM),mingw) 16 ifeq ($(MXE_SYSTEM),mingw)
17 $(PKG)_LIGS := -lsecur32 17 $(PKG)_LIBS := -lsecur32
18 endif 18 endif
19 19
20 define $(PKG)_UPDATE 20 define $(PKG)_UPDATE
21 $(WGET) -q -O- 'http://git.postgresql.org/gitweb?p=postgresql.git;a=tags' | \ 21 $(WGET) -q -O- 'http://git.postgresql.org/gitweb?p=postgresql.git;a=tags' | \
22 grep 'refs/tags/REL9[0-9_]*"' | \ 22 grep 'refs/tags/REL9[0-9_]*"' | \
50 --without-libxml \ 50 --without-libxml \
51 --without-libxslt \ 51 --without-libxslt \
52 --with-zlib \ 52 --with-zlib \
53 --with-system-tzdata=/dev/null \ 53 --with-system-tzdata=/dev/null \
54 LIBS="$($(PKG)_LIBS) `'$(MXE_PKG_CONFIG)' openssl --libs`" 54 LIBS="$($(PKG)_LIBS) `'$(MXE_PKG_CONFIG)' openssl --libs`"
55 $(MAKE) -C '$(1)'/src/interfaces/libpq -j '$(JOBS)' install haslibarule= 55 $(MAKE) -C '$(1)'/src/interfaces/libpq -j '$(JOBS)' install haslibarule= DESTDIR='$(3)'
56 $(MAKE) -C '$(1)'/src/port -j '$(JOBS)' haslibarule= 56 $(MAKE) -C '$(1)'/src/port -j '$(JOBS)' haslibarule=
57 $(MAKE) -C '$(1)'/src/bin/psql -j '$(JOBS)' install haslibarule= 57 $(MAKE) -C '$(1)'/src/bin/psql -j '$(JOBS)' install haslibarule= DESTDIR='$(3)'
58 $(INSTALL) -m644 '$(1)/src/include/pg_config.h' '$(HOST_INCDIR)' 58 $(MAKE) -C '$(1)'/src/bin/pg_config -j '$(JOBS)' install haslibarule= DESTDIR='$(3)'
59 $(INSTALL) -m644 '$(1)/src/include/postgres_ext.h' '$(HOST_INCDIR)' 59 $(INSTALL) -m644 '$(1)/src/include/pg_config.h' '$(3)$(HOST_INCDIR)'
60 $(INSTALL) -d '$(HOST_INCDIR)/libpq' 60 $(INSTALL) -m644 '$(1)/src/include/postgres_ext.h' '$(3)$(HOST_INCDIR)'
61 $(INSTALL) -m644 '$(1)'/src/include/libpq/* '$(HOST_INCDIR)/libpq/' 61 $(INSTALL) -d '$(3)$(HOST_INCDIR)/libpq'
62 $(INSTALL) -m644 '$(1)'/src/include/libpq/* '$(3)$(HOST_INCDIR)/libpq/'
62 # Build a native pg_config. 63 # Build a native pg_config.
63 $(SED) -i 's,-DVAL_,-D_DISABLED_VAL_,g' '$(1).native'/src/bin/pg_config/Makefile 64 $(SED) -i 's,-DVAL_,-D_DISABLED_VAL_,g' '$(1).native'/src/bin/pg_config/Makefile
64 cd '$(1).native' && ./configure \ 65 cd '$(1).native' && ./configure \
65 --prefix='$(HOST_PREFIX)' \ 66 --prefix='$(BUILD_TOOLS_PREFIX)' \
66 $(ENABLE_SHARED_OR_STATIC) \ 67 $(ENABLE_SHARED_OR_STATIC) \
67 --disable-rpath \ 68 --disable-rpath \
68 --without-tcl \ 69 --without-tcl \
69 --without-perl \ 70 --without-perl \
70 --without-python \ 71 --without-python \
79 --without-libxml \ 80 --without-libxml \
80 --without-libxslt \ 81 --without-libxslt \
81 --without-zlib \ 82 --without-zlib \
82 --with-system-tzdata=/dev/null 83 --with-system-tzdata=/dev/null
83 $(MAKE) -C '$(1).native'/src/port -j '$(JOBS)' 84 $(MAKE) -C '$(1).native'/src/port -j '$(JOBS)'
84 $(MAKE) -C '$(1).native'/src/bin/pg_config -j '$(JOBS)' install 85 $(MAKE) -C '$(1).native'/src/bin/pg_config -j '$(JOBS)' install DESTDIR=$(3)
85 if [ $(MXE_NATIVE_BUILD) = no ]; then \ 86 if [ $(MXE_NATIVE_BUILD) = no ]; then \
86 $(INSTALL) -m755 '$(HOST_BINDIR)/pg_config' '$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)pg_config'; \ 87 $(INSTALL) -m755 '$(3)$(BUILD_TOOLS_PREFIX)/bin/pg_config' '$(3)$(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)pg_config'; \
87 fi 88 fi
88 endef 89 endef