head	1.4;
access;
symbols;
locks; strict;
comment	@# @;


1.4
date	2000.10.10.22.01.54;	author momjian;	state dead;
branches;
next	1.3;

1.3
date	2000.09.17.13.02.34;	author petere;	state Exp;
branches;
next	1.2;

1.2
date	2000.09.08.18.29.26;	author petere;	state Exp;
branches;
next	1.1;

1.1
date	2000.08.26.13.08.16;	author petere;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Rename pg-config to pg_config to be consistent with other pg commands.
@
text
@# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg-config/Makefile,v 1.3 2000/09/17 13:02:34 petere Exp $

subdir = src/bin/pg-config
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global

all: pg-config

pg-config: pg-config.sh $(top_builddir)/config.status $(top_builddir)/src/Makefile.global Makefile
	configure=`sed -n '7s,^# [^ ]*configure *,,p' $(top_builddir)/config.status` && \
	sed -e 's,@@bindir@@,$(bindir),g' \
	    -e 's,@@includedir@@,$(includedir),g' \
	    -e 's,@@libdir@@,$(libdir),g' \
	    -e "s,@@configure@@,$$configure,g" \
	    -e 's,@@version@@,$(VERSION),g' \
	  $< >$@@
	chmod a+x $@@

install: all installdirs
	$(INSTALL_SCRIPT) pg-config $(DESTDIR)$(bindir)/pg-config

installdirs:
	$(mkinstalldirs) $(DESTDIR)$(bindir)

uninstall:
	rm -f $(DESTDIR)$(bindir)/pg-config

clean distclean maintainer-clean:
	rm -f pg-config
@


1.3
log
@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.
@
text
@d1 1
a1 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg-config/Makefile,v 1.2 2000/09/08 18:29:26 petere Exp $
@


1.2
log
@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.
@
text
@d1 1
a1 1
# $Header: /home/projects/pgsql/cvsroot/pgsql/src/bin/pg-config/Makefile,v 1.1 2000/08/26 13:08:16 petere Exp $
d20 1
a20 1
	$(INSTALL_SCRIPT) pg-config $(bindir)/pg-config
d23 1
a23 1
	$(mkinstalldirs) $(bindir)
d26 1
a26 1
	rm -f $(bindir)/pg-config
@


1.1
log
@Add pg-config utility that stores some configuration parameters other
packages can use to configure their build.

E.g.,
$ pg-config --libdir
/usr/local/pgsql/lib

`pg-config --configure' stores the configure command line.
@
text
@d1 1
a1 1
# $Header$
a9 1
	rm -f $@@ $@@.tmp
d16 2
a17 3
	  $< >$@@.tmp
	chmod a+x $@@.tmp
	mv $@@.tmp $@@
@

