Substitute libdir into createlang as last resort so one doesn't have to set

PGLIB or use any option anymore.
This commit is contained in:
Peter Eisentraut 2000-08-20 11:56:29 +00:00
parent 9b3d66ecbd
commit a67343d67d
2 changed files with 8 additions and 10 deletions

View File

@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
# $Header: /cvsroot/pgsql/src/bin/scripts/Makefile,v 1.6 2000/06/28 05:09:37 tgl Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Makefile,v 1.7 2000/08/20 11:56:29 petere Exp $
#
#-------------------------------------------------------------------------
@ -17,10 +17,12 @@ SCRIPTS := createdb dropdb createuser dropuser createlang droplang vacuumdb
all: $(SCRIPTS)
createlang: createlang.sh
sed -e 's/__DLSUFFIX__/$(DLSUFFIX)/' $< > $@
sed -e 's:__DLSUFFIX__:$(DLSUFFIX):g' \
-e 's:__libdir__:$(libdir):g' \
$< > $@
install: all installdirs
for i in $(SCRIPTS); do $(INSTALL_SCRIPT) $$i $(bindir); done
for i in $(SCRIPTS); do $(INSTALL_SCRIPT) $$i $(bindir) || exit; done
installdirs:
$(mkinstalldirs) $(bindir)

View File

@ -8,7 +8,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.13 2000/07/19 11:53:02 wieck Exp $
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.14 2000/08/20 11:56:29 petere Exp $
#
#-------------------------------------------------------------------------
@ -129,7 +129,7 @@ if [ "$usage" ]; then
echo " -U, --username=USERNAME Username to connect as"
echo " -W, --password Prompt for password"
echo " -d, --dbname=DBNAME Database to install language in"
echo " -L, --pglib=PGLIB Find language interpreter in directory PGLIB"
echo " -L, --pglib=DIRECTORY Find language interpreter file in DIRECTORY"
echo " -l, --list Show a list of currently installed languages"
echo
echo "Report bugs to <pgsql-bugs@postgresql.org>."
@ -160,11 +160,7 @@ fi
# Check that we have PGLIB
# ----------
if [ -z "$PGLIB" ]; then
echo "$CMDNAME: missing required argument PGLIB directory"
echo "(This is the directory where the interpreter for the procedural"
echo "language is stored. Traditionally, these are installed in whatever"
echo "'lib' directory was specified at configure time.)"
exit 1
PGLIB='__libdir__'
fi
# ----------