1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-27 07:42:10 +03:00
Files
postgres/src/interfaces/odbc/GNUmakefile
Peter Eisentraut 335248c9b7 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 13:02:52 +00:00

63 lines
1.7 KiB
Makefile

#-------------------------------------------------------------------------
#
# GNUMakefile for psqlodbc (Postgres ODBC driver)
#
# $Header: /cvsroot/pgsql/src/interfaces/odbc/Attic/GNUmakefile,v 1.3 2000/09/17 13:02:51 petere Exp $
#
#-------------------------------------------------------------------------
subdir = src/interfaces/odbc
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
# Shared library parameters
NAME = psqlodbc
SO_MAJOR_VERSION = 0
SO_MINOR_VERSION = 26
CPPFLAGS += -I$(srcdir) -DHAVE_CONFIG_H -DODBCINSTDIR='"$(odbcinst_ini_dir)"'
OBJS = info.o bind.o columninfo.o connection.o convert.o drvconn.o \
environ.o execute.o lobj.o misc.o options.o \
pgtypes.o psqlodbc.o qresult.o results.o socket.o parse.o statement.o \
gpps.o tuple.o tuplelist.o dlg_specific.o $(OBJX)
SHLIB_LINK= $(LD_FLAGS)
all: all-lib
# Shared library stuff
include $(top_srcdir)/src/Makefile.shlib
LDFLAGS_SL+= $(LDFLAGS_ODBC)
odbc_headers = isql.h isqlext.h iodbc.h
odbc_includedir = $(includedir)/iodbc
install: all installdirs install-headers install-ini install-lib
installdirs:
$(mkinstalldirs) $(DESTDIR)$(odbc_includedir) $(DESTDIR)$(libdir) $(DESTDIR)$(odbcinst_ini_dir)
.PHONY: install-headers
install-headers: $(odbc_headers)
for i in $^; do $(INSTALL_DATA) $$i $(DESTDIR)$(odbc_includedir) || exit 1; done
.PHONY: install-ini
install-ini: odbcinst.ini
$(INSTALL_DATA) $< $(DESTDIR)$(odbcinst_ini_dir)
uninstall: uninstall-lib
rm -f $(addprefix $(DESTDIR)$(odbc_includedir)/, $(odbc_headers))
clean distclean maintainer-clean: clean-lib
rm -f $(OBJS)
depend dep:
$(CC) -MM $(CFLAGS) *.c >depend
ifeq (depend,$(wildcard depend))
include depend
endif