summaryrefslogtreecommitdiff
path: root/src/bin/scripts
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2000-09-08 18:29:28 +0000
committerPeter Eisentraut <peter_e@gmx.net>2000-09-08 18:29:28 +0000
commitda06bc1d4088508781a82737365a486c2927a2f8 (patch)
tree11190416a85c3b872407293afdc1d948233b69db /src/bin/scripts
parentf2bfe8a24c46133f81e188653a127f939eb33c4a (diff)
downloadpostgresql-da06bc1d4088508781a82737365a486c2927a2f8.tar.gz
Make building scripts kind of consistent in look and feel, kind of immune
to parallel make, kind of resistent to corruption due to incomplete builds.
Diffstat (limited to 'src/bin/scripts')
-rw-r--r--src/bin/scripts/Makefile9
-rw-r--r--src/bin/scripts/createlang.sh11
2 files changed, 11 insertions, 9 deletions
diff --git a/src/bin/scripts/Makefile b/src/bin/scripts/Makefile
index e43fc90121..85ef899048 100644
--- a/src/bin/scripts/Makefile
+++ b/src/bin/scripts/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/bin/scripts/Makefile,v 1.8 2000/08/31 16:11:25 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/scripts/Makefile,v 1.9 2000/09/08 18:29:28 petere Exp $
#
#-------------------------------------------------------------------------
@@ -17,9 +17,10 @@ SCRIPTS := createdb dropdb createuser dropuser createlang droplang vacuumdb
all: $(SCRIPTS)
createlang: createlang.sh
- sed -e 's:__DLSUFFIX__:$(DLSUFFIX):g' \
- -e 's:__libdir__:$(libdir):g' \
- $< > $@
+ sed -e 's/@DLSUFFIX@/$(DLSUFFIX)/g' \
+ -e 's,@libdir@,$(libdir),g' \
+ $< >$@
+ chmod a+x $@
install: all installdirs
for i in $(SCRIPTS); do $(INSTALL_SCRIPT) $$i $(bindir) || exit; done
diff --git a/src/bin/scripts/createlang.sh b/src/bin/scripts/createlang.sh
index 46e503baf4..0ba0edaa97 100644
--- a/src/bin/scripts/createlang.sh
+++ b/src/bin/scripts/createlang.sh
@@ -8,7 +8,7 @@
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.14 2000/08/20 11:56:29 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.15 2000/09/08 18:29:28 petere Exp $
#
#-------------------------------------------------------------------------
@@ -160,7 +160,7 @@ fi
# Check that we have PGLIB
# ----------
if [ -z "$PGLIB" ]; then
- PGLIB='__libdir__'
+ PGLIB='@libdir@'
fi
# ----------
@@ -206,13 +206,14 @@ case "$langname" in
;;
esac
+DLSUFFIX='@DLSUFFIX@'
# ----------
# Check that the shared object for the call handler is installed
# in PGLIB
# ----------
-if [ ! -f $PGLIB/${object}__DLSUFFIX__ ]; then
- echo "$CMDNAME: cannot find the file $PGLIB/${langname}__DLSUFFIX__"
+if [ ! -f "$PGLIB/$object$DLSUFFIX" ]; then
+ echo "$CMDNAME: cannot find the file \`$PGLIB/$langname$DLSUFFIX'"
echo ""
echo "This file contains the call handler for $lancomp. By default,"
echo "only PL/pgSQL is built and installed; other languages must be"
@@ -251,7 +252,7 @@ fi
# ----------
# Create the call handler and the language
# ----------
-$PSQL "CREATE FUNCTION $handler () RETURNS OPAQUE AS '$PGLIB/${object}__DLSUFFIX__' LANGUAGE 'newC'"
+$PSQL "CREATE FUNCTION $handler () RETURNS OPAQUE AS '$PGLIB/${object}$DLSUFFIX' LANGUAGE 'newC'"
if [ $? -ne 0 ]; then
echo "$CMDNAME: language installation failed"
exit 1