From 44a85d9176a9f41d932f9ab53abceed5c080ae46 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Tue, 27 Apr 2021 15:33:38 +0300 Subject: [PATCH] Put back 'pgbuild.sh', which was removed accidentally. Oops, I deleted it accidentally in commit 96beffb3c5. Put it back. --- pgbuild.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 pgbuild.sh diff --git a/pgbuild.sh b/pgbuild.sh new file mode 100755 index 0000000000..9d4c0baa65 --- /dev/null +++ b/pgbuild.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Purpose of this script is to build and install postgres in a local directory +# so that zenith intergation tests would find pg binaries and support files. +# +# ./pgbuild.sh would do following: +# +# 1) run out-of-source build of postgres in REPO_ROOT/tmp_install/build directory (I'm reusing +# tmp_install path here since it is already present in .gitignore) +# +# 2) installs postgres to REPO_ROOT/tmp_install/ +# + +# Halt immediately if any command fails +set -e + +REPO_ROOT=$(dirname "$0") +REPO_ROOT="`( cd \"$REPO_ROOT\" && pwd )`" + +# configure +echo "Configuring postgres build" +mkdir -p $REPO_ROOT/tmp_install/build +cd $REPO_ROOT/tmp_install/build +../../vendor/postgres/configure CFLAGS='-O0' --enable-debug --enable-cassert \ + --enable-depend --with-libxml --prefix=/ > configure.log + +# compile +echo "Compiling postgres" +make -j8 -s +export DESTDIR=$REPO_ROOT/tmp_install + +echo "Installing postgres to $DESTDIR" +make install -s