aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2001-08-28 14:20:28 +0000
committerPeter Eisentraut <peter_e@gmx.net>2001-08-28 14:20:28 +0000
commitf5944af8ba020b26741845c59682e6bd835beb07 (patch)
treeafbfcc4b7fd07e80e475a0338945d76f2d2bb58a /src
parent3fcea502c49746cd353c9f1827ebb3c5a535a9f0 (diff)
downloadpostgresql-f5944af8ba020b26741845c59682e6bd835beb07.tar.gz
postgresql-f5944af8ba020b26741845c59682e6bd835beb07.zip
Include directory rearrangement
Client headers are no longer in a subdirectory, since they have been made namespace-clean. Internal libpq headers are in a private subdirectory. Server headers are in a private subdirectory. pg_config has a new option to point there.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.global.in10
-rw-r--r--src/bin/pg_config/Makefile3
-rw-r--r--src/bin/pg_config/pg_config.sh21
-rw-r--r--src/include/Makefile58
-rw-r--r--src/interfaces/libpq/Makefile24
5 files changed, 53 insertions, 63 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 8055b4f0cf2..dc54dcd1e66 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -1,5 +1,5 @@
# -*-makefile-*-
-# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.134 2001/08/27 00:29:49 petere Exp $
+# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.135 2001/08/28 14:20:26 petere Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -83,11 +83,9 @@ libdir := @libdir@
pkglibdir = $(libdir)/postgresql
includedir := @includedir@
-ifeq "$(findstring pgsql, $(includedir))" ""
-ifeq "$(findstring postgres, $(includedir))" ""
-override includedir := $(includedir)/postgresql
-endif
-endif
+pkgincludedir = $(includedir)/postgresql
+includedir_server = $(pkgincludedir)/server
+includedir_internal = $(pkgincludedir)/internal
mandir := @mandir@
diff --git a/src/bin/pg_config/Makefile b/src/bin/pg_config/Makefile
index d4dffd8b43e..0efaff5e352 100644
--- a/src/bin/pg_config/Makefile
+++ b/src/bin/pg_config/Makefile
@@ -1,4 +1,4 @@
-# $Header: /cvsroot/pgsql/src/bin/pg_config/Makefile,v 1.1 2000/10/10 22:01:55 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/pg_config/Makefile,v 1.2 2001/08/28 14:20:28 petere Exp $
subdir = src/bin/pg_config
top_builddir = ../../..
@@ -10,6 +10,7 @@ pg_config: pg_config.sh $(top_builddir)/config.status $(top_builddir)/src/Makefi
configure=`sed -n '7s,^# [^ ]*configure *,,p' $(top_builddir)/config.status` && \
sed -e 's,@bindir@,$(bindir),g' \
-e 's,@includedir@,$(includedir),g' \
+ -e 's,@includedir_server@,$(includedir_server),g' \
-e 's,@libdir@,$(libdir),g' \
-e "s,@configure@,$$configure,g" \
-e 's,@version@,$(VERSION),g' \
diff --git a/src/bin/pg_config/pg_config.sh b/src/bin/pg_config/pg_config.sh
index 6576260f4f2..df05b92fee7 100644
--- a/src/bin/pg_config/pg_config.sh
+++ b/src/bin/pg_config/pg_config.sh
@@ -7,13 +7,14 @@
# Author: Peter Eisentraut <peter_e@gmx.net>
# Public domain
-# $Header: /cvsroot/pgsql/src/bin/pg_config/Attic/pg_config.sh,v 1.3 2001/05/13 00:12:05 petere Exp $
+# $Header: /cvsroot/pgsql/src/bin/pg_config/Attic/pg_config.sh,v 1.4 2001/08/28 14:20:28 petere Exp $
me=`basename $0`
# stored configuration values
val_bindir='@bindir@'
val_includedir='@includedir@'
+val_includedir_server='@includedir_server@'
val_libdir='@libdir@'
val_configure="@configure@"
val_version='@version@'
@@ -21,15 +22,17 @@ val_version='@version@'
help="\
$me provides information about the installed version of PostgreSQL.
-Usage: $me --bindir | --includedir | --libdir | --configure | --version
+Usage: $me --bindir | --includedir | --includedir-server | --libdir | --configure | --version
Operation modes:
- --bindir show location of user executables
- --includedir show location of C header files
- --libdir show location of object code libraries
- --configure show options given to 'configure' script when
- PostgreSQL was built
- --version show PostgreSQL version and exit
+ --bindir show location of user executables
+ --includedir show location of C header files of the client
+ interfaces
+ --includedir-server show location of C header files for the server
+ --libdir show location of object code libraries
+ --configure show options given to 'configure' script when
+ PostgreSQL was built
+ --version show the PostgreSQL version and exit
Report bugs to <pgsql-bugs@postgresql.org>."
@@ -49,6 +52,8 @@ do
case $opt in
--bindir) show="$show \$val_bindir";;
--includedir) show="$show \$val_includedir";;
+ --includedir-server)
+ show="$show \$val_includedir_server";;
--libdir) show="$show \$val_libdir";;
--configure) show="$show \$val_configure";;
diff --git a/src/include/Makefile b/src/include/Makefile
index a8aed3fdd70..e66c62f6eaf 100644
--- a/src/include/Makefile
+++ b/src/include/Makefile
@@ -6,7 +6,7 @@
# programming. 'make install-all-headers' installs the whole contents
# of src/include.
#
-# $Header: /cvsroot/pgsql/src/include/Makefile,v 1.9 2001/08/24 14:07:49 petere Exp $
+# $Header: /cvsroot/pgsql/src/include/Makefile,v 1.10 2001/08/28 14:20:28 petere Exp $
#
#-------------------------------------------------------------------------
@@ -14,54 +14,48 @@ subdir = src/include
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
-# Headers needed by clients
-srcdir_headers := c.h postgres_ext.h postgres_fe.h \
- libpq/pqcomm.h libpq/libpq-fs.h lib/dllist.h
-builddir_headers := pg_config_os.h pg_config.h
-
-HEADERS = $(srcdir_headers) $(builddir_headers)
-
-# Subdirectories containing headers that install-all-headers should install
-SUBDIRS = access bootstrap catalog commands executor lib libpq mb \
- nodes optimizer parser port regex rewrite storage tcop utils
-
-
-all: $(HEADERS)
+all: pg_config.h pg_config_os.h
# Install only selected headers
install: all installdirs remove-old-headers
- for file in $(srcdir_headers); do \
- $(INSTALL_DATA) $(srcdir)/$$file $(DESTDIR)$(includedir)/$$file || exit; \
- done
- for file in $(builddir_headers); do \
- $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/$$file || exit; \
- done
+# These headers are needed by the public headers of the interfaces.
+ $(INSTALL_DATA) $(srcdir)/postgres_ext.h $(DESTDIR)$(includedir)
+ $(INSTALL_DATA) $(srcdir)/libpq/libpq-fs.h $(DESTDIR)$(includedir)/libpq
+ $(INSTALL_DATA) pg_config.h $(DESTDIR)$(includedir)
+ $(INSTALL_DATA) pg_config_os.h $(DESTDIR)$(includedir)
+# These headers are needed by the not-so-public headers of the interfaces.
+ $(INSTALL_DATA) $(srcdir)/c.h $(DESTDIR)$(includedir_internal)
+ $(INSTALL_DATA) $(srcdir)/postgres_fe.h $(DESTDIR)$(includedir_internal)
+ $(INSTALL_DATA) $(srcdir)/libpq/pqcomm.h $(DESTDIR)$(includedir_internal)/libpq
+ $(INSTALL_DATA) $(srcdir)/lib/dllist.h $(DESTDIR)$(includedir_internal)/lib
-# Automatically pick out the needed subdirectories for the include tree.
installdirs:
- $(mkinstalldirs) $(addprefix $(DESTDIR)$(includedir)/, $(sort $(dir $(HEADERS))))
+ $(mkinstalldirs) $(DESTDIR)$(includedir)/libpq $(DESTDIR)$(includedir_internal)/libpq $(DESTDIR)$(includedir_internal)/lib
# Install all headers
+# Subdirectories containing headers that install-all-headers should install
+SUBDIRS = access bootstrap catalog commands executor lib libpq mb \
+ nodes optimizer parser port regex rewrite storage tcop utils
+
install-all-headers: all install-all-dirs
+ $(INSTALL_DATA) pg_config.h $(DESTDIR)$(includedir_server)
+ $(INSTALL_DATA) pg_config_os.h $(DESTDIR)$(includedir_server)
for file in $(srcdir)/*.h; do \
- $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/`basename $$file` || exit; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(includedir_server)/`basename $$file` || exit; \
done
for dir in $(SUBDIRS); do \
for file in $(srcdir)/$$dir/*.h; do \
- $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/$$dir/`basename $$file` || exit; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(includedir_server)/$$dir/`basename $$file` || exit; \
done \
done
- for file in $(builddir_headers); do \
- $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/$$file || exit; \
- done
install-all-dirs:
- $(mkinstalldirs) $(addprefix $(DESTDIR)$(includedir)/, $(SUBDIRS))
+ $(mkinstalldirs) $(addprefix $(DESTDIR)$(includedir_server)/, $(SUBDIRS))
# Pre-7.1 Postgres installed some headers that are no longer installed by
@@ -82,10 +76,12 @@ remove-old-headers:
done
-# This isn't a complete uninstall, but rm'ing everything under
-# $(DESTDIR)$(includedir) is probably too drastic...
uninstall:
- rm -rf $(addprefix $(DESTDIR)$(includedir)/, $(HEADERS) $(SUBDIRS))
+ rm -f $(addprefix $(DESTDIR)$(includedir)/, pg_config.h pg_config_os.h postgres_ext.h libpq/libpq-fs.h)
+ rm -f $(addprefix $(DESTDIR)$(includedir_internal)/, c.h postgres_fe.h lib/dllist.h libpq/pqcomm.h)
+# heuristic...
+ rm -rf $(addprefix $(DESTDIR)$(includedir_server)/, $(SUBDIRS) *.h)
+
clean:
rm -f utils/fmgroids.h parser/parse.h
diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile
index 2973799c37f..ce2bd7058f0 100644
--- a/src/interfaces/libpq/Makefile
+++ b/src/interfaces/libpq/Makefile
@@ -4,7 +4,7 @@
#
# Copyright (c) 1994, Regents of the University of California
#
-# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.55 2001/08/15 21:08:21 momjian Exp $
+# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.56 2001/08/28 14:20:28 petere Exp $
#
#-------------------------------------------------------------------------
@@ -33,7 +33,7 @@ endif
SHLIB_LINK += $(filter -L%, $(LDFLAGS)) $(filter -lcrypt -ldes -lkrb -lcom_err -lcrypto -lk5crypto -lkrb5 -lssl -lsocket -lnsl -lresolv -lintl, $(LIBS))
-all: md5.c all-lib
+all: all-lib
# Shared library stuff
include $(top_srcdir)/src/Makefile.shlib
@@ -70,27 +70,17 @@ wchar.c : % : $(backend_src)/utils/mb/%
endif
-install: all installdirs install-headers install-lib
-
-.PHONY: install-headers
-install-headers: libpq-fe.h libpq-int.h pqexpbuffer.h
+install: all installdirs install-lib
$(INSTALL_DATA) $(srcdir)/libpq-fe.h $(DESTDIR)$(includedir)
- $(INSTALL_DATA) $(srcdir)/libpq-int.h $(DESTDIR)$(includedir)
- $(INSTALL_DATA) $(srcdir)/pqexpbuffer.h $(DESTDIR)$(includedir)
+ $(INSTALL_DATA) $(srcdir)/libpq-int.h $(DESTDIR)$(includedir_internal)
+ $(INSTALL_DATA) $(srcdir)/pqexpbuffer.h $(DESTDIR)$(includedir_internal)
installdirs:
- $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir) $(DESTDIR)$(includedir_internal)
uninstall: uninstall-lib
- rm -f $(addprefix $(DESTDIR)$(includedir)/, libpq-fe.h libpq-int.h pqexpbuffer.h)
+ rm -f $(DESTDIR)$(includedir)/libpq-fe.h $(DESTDIR)$(includedir_internal)/libpq-int.h $(includedir_internal)/pqexpbuffer.h
clean distclean maintainer-clean: clean-lib
rm -f $(OBJS) dllist.c md5.c md5.h wchar.c
rm -f $(OBJS) inet_aton.c snprintf.c strerror.c
-
-depend dep:
- $(CC) -MM $(CFLAGS) *.c >depend
-
-ifeq (depend,$(wildcard depend))
-include depend
-endif