1996-07-09 08:22:35 +02:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
2000-06-27 02:32:06 +02:00
|
|
|
# Makefile for src/bin/initdb
|
1996-07-09 08:22:35 +02:00
|
|
|
#
|
2004-12-31 23:04:05 +01:00
|
|
|
# Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
2001-02-18 19:34:02 +01:00
|
|
|
# Portions Copyright (c) 1994, Regents of the University of California
|
1996-07-09 08:22:35 +02:00
|
|
|
#
|
2005-03-25 19:17:14 +01:00
|
|
|
# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.49 2005/03/25 18:17:12 momjian Exp $
|
1996-07-09 08:22:35 +02:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
2004-10-05 21:30:25 +02:00
|
|
|
PGFILEDESC = "initdb - initialize a new database cluster"
|
2000-06-27 02:32:06 +02:00
|
|
|
subdir = src/bin/initdb
|
|
|
|
top_builddir = ../../..
|
2000-08-31 18:12:35 +02:00
|
|
|
include $(top_builddir)/src/Makefile.global
|
1996-07-09 08:22:35 +02:00
|
|
|
|
2004-10-04 20:05:55 +02:00
|
|
|
override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
|
1996-07-09 08:22:35 +02:00
|
|
|
|
2004-10-05 21:30:25 +02:00
|
|
|
OBJS= initdb.o $(WIN32RES)
|
2003-11-10 23:51:16 +01:00
|
|
|
|
|
|
|
all: submake-libpq submake-libpgport initdb
|
|
|
|
|
|
|
|
initdb: $(OBJS) $(libpq_builddir)/libpq.a
|
2005-03-25 19:17:14 +01:00
|
|
|
$(CC) $(CFLAGS) $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LIBS) -o $@$(X)
|
2003-11-10 23:51:16 +01:00
|
|
|
|
2000-06-27 02:32:06 +02:00
|
|
|
install: all installdirs
|
2003-11-10 23:51:16 +01:00
|
|
|
$(INSTALL_PROGRAM) initdb$(X) $(DESTDIR)$(bindir)/initdb$(X)
|
1996-11-11 14:41:36 +01:00
|
|
|
|
2000-06-27 02:32:06 +02: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 15:02:52 +02:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
1996-12-10 04:40:23 +01:00
|
|
|
|
2000-06-27 02:32:06 +02:00
|
|
|
uninstall:
|
2003-11-11 02:58:23 +01:00
|
|
|
rm -f $(DESTDIR)$(bindir)/initdb$(X)
|
2000-06-27 02:32:06 +02:00
|
|
|
|
2003-11-23 22:42:13 +01:00
|
|
|
clean distclean maintainer-clean:
|
2004-10-04 15:43:59 +02:00
|
|
|
rm -f initdb$(X) $(OBJS)
|
2003-12-23 22:56:21 +01:00
|
|
|
|
|
|
|
|
2004-05-11 23:57:15 +02:00
|
|
|
# ensure that changes in datadir propagate into object file
|
2003-12-23 22:56:21 +01:00
|
|
|
initdb.o: initdb.c $(top_builddir)/src/Makefile.global
|