Substitute libdir into createlang as last resort so one doesn't have to set
authorPeter Eisentraut <peter_e@gmx.net>
Sun, 20 Aug 2000 11:56:29 +0000 (11:56 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Sun, 20 Aug 2000 11:56:29 +0000 (11:56 +0000)
PGLIB or use any option anymore.

src/bin/scripts/Makefile
src/bin/scripts/createlang.sh

index c08382ffcc0a62d890b040782db4f91ca24668ec..3b4f971cf79c78f98ff9649d5a7aa952c0e2012a 100644 (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)
index daace97a4492485b8a59811c6a7982bbd02b3610..46e503baf49fdd19246888fbde6c9980d69e229d 100644 (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
 
 # ----------