1999-12-03 23:53:22 -05:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
#
|
2000-06-26 20:32:06 -04:00
|
|
|
# Makefile for src/bin/scripts
|
1999-12-03 23:53:22 -05:00
|
|
|
#
|
2002-06-20 16:29:54 -04:00
|
|
|
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
2001-02-18 13:34:02 -05:00
|
|
|
# Portions Copyright (c) 1994, Regents of the University of California
|
1999-12-03 23:53:22 -05:00
|
|
|
#
|
2002-10-18 15:35:28 -04:00
|
|
|
# $Header: /cvsroot/pgsql/src/bin/scripts/Makefile,v 1.18 2002/10/18 19:35:28 tgl Exp $
|
1999-12-03 23:53:22 -05:00
|
|
|
#
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
|
2000-06-26 20:32:06 -04:00
|
|
|
subdir = src/bin/scripts
|
|
|
|
|
top_builddir = ../../..
|
2000-08-31 12:12:35 -04:00
|
|
|
include $(top_builddir)/src/Makefile.global
|
1999-12-03 23:53:22 -05:00
|
|
|
|
2002-08-26 23:38:28 -04:00
|
|
|
SCRIPTS := createdb dropdb createuser dropuser createlang droplang vacuumdb \
|
|
|
|
|
clusterdb
|
1999-12-03 23:53:22 -05:00
|
|
|
|
|
|
|
|
all: $(SCRIPTS)
|
|
|
|
|
|
2002-10-18 15:35:28 -04:00
|
|
|
# we don't really need to edit createlang.sh at the moment,
|
|
|
|
|
# but keep the old generation procedure in case we need it again.
|
|
|
|
|
createlang: createlang.sh
|
|
|
|
|
cp $< $@
|
|
|
|
|
chmod a+x $@
|
1999-12-05 15:02:49 -05:00
|
|
|
|
2000-06-26 20:32:06 -04:00
|
|
|
install: all installdirs
|
2000-10-20 17:04:27 -04:00
|
|
|
for i in $(filter-out createlang, $(SCRIPTS)); do \
|
|
|
|
|
$(INSTALL_SCRIPT) $(srcdir)/$$i $(DESTDIR)$(bindir)/$$i || exit; \
|
|
|
|
|
done
|
|
|
|
|
$(INSTALL_SCRIPT) createlang $(DESTDIR)$(bindir)/createlang
|
1999-12-03 23:53:22 -05:00
|
|
|
|
2000-06-26 20:32:06 -04:00
|
|
|
installdirs:
|
Support for DESTDIR make variable. This is used as in `make install
DESTDIR=/else/where' and prepends the value of DESTDIR to the full
installation paths (e.g., /else/where/usr/local/pgsql/bin). This allows
users to install the package into a location different from the one that
was configured and hard-coded into various scripts, e.g., for creating
binary packages.
DESTDIR is in many cases preferrable over `make install
prefix=/else/where' because
a) `prefix' affects the path that is hard-coded into the files, which can
lead to a `make install prefix=xxx' (as done by the regression test
driver) corrupting the files in the source tree with wrong paths.
b) it doesn't work at all if a directory was overridden to not depend on
`prefix', e.g., --sysconfdir=/etc.
(Updating the regression test driver to use DESTDIR is a separate
undertaking.)
See also autoconf@gnu.org, From: Akim Demaille <akim@epita.fr>, Date: 08
Sep 2000 12:48:59 +0200, Message-ID:
<mv4em2vb1lw.fsf@nostromo.lrde.epita.fr>, Subject: Re: HTML format
documentation.
2000-09-17 09:02:52 -04:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
1999-12-03 23:53:22 -05:00
|
|
|
|
2000-06-26 20:32:06 -04:00
|
|
|
uninstall:
|
Support for DESTDIR make variable. This is used as in `make install
DESTDIR=/else/where' and prepends the value of DESTDIR to the full
installation paths (e.g., /else/where/usr/local/pgsql/bin). This allows
users to install the package into a location different from the one that
was configured and hard-coded into various scripts, e.g., for creating
binary packages.
DESTDIR is in many cases preferrable over `make install
prefix=/else/where' because
a) `prefix' affects the path that is hard-coded into the files, which can
lead to a `make install prefix=xxx' (as done by the regression test
driver) corrupting the files in the source tree with wrong paths.
b) it doesn't work at all if a directory was overridden to not depend on
`prefix', e.g., --sysconfdir=/etc.
(Updating the regression test driver to use DESTDIR is a separate
undertaking.)
See also autoconf@gnu.org, From: Akim Demaille <akim@epita.fr>, Date: 08
Sep 2000 12:48:59 +0200, Message-ID:
<mv4em2vb1lw.fsf@nostromo.lrde.epita.fr>, Subject: Re: HTML format
documentation.
2000-09-17 09:02:52 -04:00
|
|
|
rm -f $(addprefix $(DESTDIR)$(bindir)/, $(SCRIPTS))
|
1999-12-05 15:02:49 -05:00
|
|
|
|
2000-06-26 20:32:06 -04:00
|
|
|
clean distclean maintainer-clean:
|
|
|
|
|
rm -f createlang
|