2000-07-06 23:33:45 +02:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Makefile for src/include
|
|
|
|
#
|
2004-10-06 10:50:02 +02:00
|
|
|
# 'make install' installs whole contents of src/include.
|
2000-07-06 23:33:45 +02:00
|
|
|
#
|
2007-09-10 22:37:36 +02:00
|
|
|
# $PostgreSQL: pgsql/src/include/Makefile,v 1.22 2007/09/10 20:37:36 teodor Exp $
|
2000-07-06 23:33:45 +02:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
subdir = src/include
|
|
|
|
top_builddir = ../..
|
2000-08-31 18:12:35 +02:00
|
|
|
include $(top_builddir)/src/Makefile.global
|
2000-07-06 23:33:45 +02:00
|
|
|
|
|
|
|
|
2001-08-28 16:20:28 +02:00
|
|
|
all: pg_config.h pg_config_os.h
|
2000-07-06 23:33:45 +02:00
|
|
|
|
|
|
|
|
2004-10-06 10:50:02 +02:00
|
|
|
# Subdirectories containing headers for server-side dev
|
|
|
|
SUBDIRS = access bootstrap catalog commands executor lib libpq mb \
|
2007-09-10 22:37:36 +02:00
|
|
|
nodes optimizer parser regex rewrite storage tcop tsearch utils \
|
2004-11-17 18:16:17 +01:00
|
|
|
port port/win32 port/win32/arpa port/win32/netinet port/win32/sys
|
2000-07-06 23:33:45 +02:00
|
|
|
|
2004-10-06 10:50:02 +02:00
|
|
|
# Install all headers
|
2004-11-09 07:23:50 +01:00
|
|
|
install: all installdirs
|
2001-08-28 16:20:28 +02:00
|
|
|
# These headers are needed by the public headers of the interfaces.
|
2005-12-09 22:19:36 +01:00
|
|
|
$(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)'
|
|
|
|
$(INSTALL_DATA) $(srcdir)/pg_config_manual.h '$(DESTDIR)$(includedir)'
|
2001-08-28 16:20:28 +02:00
|
|
|
# These headers are needed by the not-so-public headers of the interfaces.
|
2005-12-09 22:19:36 +01:00
|
|
|
$(INSTALL_DATA) $(srcdir)/c.h '$(DESTDIR)$(includedir_internal)'
|
|
|
|
$(INSTALL_DATA) $(srcdir)/port.h '$(DESTDIR)$(includedir_internal)'
|
|
|
|
$(INSTALL_DATA) $(srcdir)/postgres_fe.h '$(DESTDIR)$(includedir_internal)'
|
|
|
|
$(INSTALL_DATA) $(srcdir)/libpq/pqcomm.h '$(DESTDIR)$(includedir_internal)/libpq'
|
2004-10-06 10:50:02 +02:00
|
|
|
# These headers are needed for server-side development
|
2005-12-09 22:19:36 +01:00
|
|
|
$(INSTALL_DATA) pg_config.h '$(DESTDIR)$(includedir_server)'
|
|
|
|
$(INSTALL_DATA) pg_config_os.h '$(DESTDIR)$(includedir_server)'
|
2005-03-26 00:22:54 +01:00
|
|
|
# We don't use INSTALL_DATA for performance reasons --- there are a lot of files
|
2005-12-09 22:19:36 +01:00
|
|
|
cp $(srcdir)/*.h '$(DESTDIR)$(includedir_server)'/ || exit; \
|
|
|
|
chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/*.h || exit; \
|
2001-02-10 03:31:31 +01:00
|
|
|
for dir in $(SUBDIRS); do \
|
2005-12-09 22:19:36 +01:00
|
|
|
cp $(srcdir)/$$dir/*.h '$(DESTDIR)$(includedir_server)'/$$dir/ || exit; \
|
|
|
|
chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/$$dir/*.h || exit; \
|
2001-02-10 03:31:31 +01:00
|
|
|
done
|
|
|
|
|
2004-10-06 10:50:02 +02:00
|
|
|
installdirs:
|
2005-12-09 22:19:36 +01:00
|
|
|
$(mkinstalldirs) '$(DESTDIR)$(includedir)/libpq' '$(DESTDIR)$(includedir_internal)/libpq'
|
|
|
|
$(mkinstalldirs) $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS))
|
2001-02-10 03:31:31 +01:00
|
|
|
|
|
|
|
|
2000-07-06 23:33:45 +02:00
|
|
|
uninstall:
|
2005-12-09 22:19:36 +01:00
|
|
|
rm -f $(addprefix '$(DESTDIR)$(includedir)'/, pg_config.h pg_config_os.h pg_config_manual.h postgres_ext.h libpq/libpq-fs.h)
|
|
|
|
rm -f $(addprefix '$(DESTDIR)$(includedir_internal)'/, c.h port.h postgres_fe.h libpq/pqcomm.h)
|
2001-08-28 16:20:28 +02:00
|
|
|
# heuristic...
|
2005-12-09 22:19:36 +01:00
|
|
|
rm -rf $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS) *.h)
|
2001-08-28 16:20:28 +02:00
|
|
|
|
2000-07-06 23:33:45 +02:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f utils/fmgroids.h parser/parse.h
|
|
|
|
|
|
|
|
distclean maintainer-clean: clean
|
2001-08-24 16:07:50 +02:00
|
|
|
rm -f pg_config.h dynloader.h pg_config_os.h stamp-h
|