2000-07-07 05:33:45 +08:00
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Makefile for src/include
|
|
|
|
#
|
2004-10-06 16:50:02 +08:00
|
|
|
# 'make install' installs whole contents of src/include.
|
2000-07-07 05:33:45 +08:00
|
|
|
#
|
2010-09-21 04:08:53 +08:00
|
|
|
# src/include/Makefile
|
2000-07-07 05:33:45 +08:00
|
|
|
#
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
subdir = src/include
|
|
|
|
top_builddir = ../..
|
2000-09-01 00:12:35 +08:00
|
|
|
include $(top_builddir)/src/Makefile.global
|
2000-07-07 05:33:45 +08:00
|
|
|
|
|
|
|
|
2001-08-28 22:20:28 +08:00
|
|
|
all: pg_config.h pg_config_os.h
|
2000-07-07 05:33:45 +08:00
|
|
|
|
|
|
|
|
2004-10-06 16:50:02 +08:00
|
|
|
# Subdirectories containing headers for server-side dev
|
2009-07-01 01:38:50 +08:00
|
|
|
SUBDIRS = access bootstrap catalog commands executor foreign lib libpq mb \
|
2010-01-15 17:19:10 +08:00
|
|
|
nodes optimizer parser postmaster regex replication rewrite storage \
|
|
|
|
tcop snowball snowball/libstemmer tsearch tsearch/dicts utils \
|
2007-10-15 01:07:51 +08:00
|
|
|
port port/win32 port/win32_msvc port/win32_msvc/sys \
|
2008-05-15 03:10:29 +08:00
|
|
|
port/win32/arpa port/win32/netinet port/win32/sys \
|
|
|
|
portability
|
2000-07-07 05:33:45 +08:00
|
|
|
|
2004-10-06 16:50:02 +08:00
|
|
|
# Install all headers
|
2004-11-09 14:23:50 +08:00
|
|
|
install: all installdirs
|
2001-08-28 22:20:28 +08:00
|
|
|
# These headers are needed by the public headers of the interfaces.
|
2005-12-10 05:19:36 +08: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 22:20:28 +08:00
|
|
|
# These headers are needed by the not-so-public headers of the interfaces.
|
2005-12-10 05:19:36 +08: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 16:50:02 +08:00
|
|
|
# These headers are needed for server-side development
|
2005-12-10 05:19:36 +08:00
|
|
|
$(INSTALL_DATA) pg_config.h '$(DESTDIR)$(includedir_server)'
|
|
|
|
$(INSTALL_DATA) pg_config_os.h '$(DESTDIR)$(includedir_server)'
|
2009-07-21 04:38:55 +08:00
|
|
|
$(INSTALL_DATA) utils/fmgroids.h '$(DESTDIR)$(includedir_server)/utils'
|
2005-03-26 07:22:54 +08:00
|
|
|
# We don't use INSTALL_DATA for performance reasons --- there are a lot of files
|
2005-12-10 05:19:36 +08:00
|
|
|
cp $(srcdir)/*.h '$(DESTDIR)$(includedir_server)'/ || exit; \
|
|
|
|
chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/*.h || exit; \
|
2001-02-10 10:31:31 +08:00
|
|
|
for dir in $(SUBDIRS); do \
|
2005-12-10 05:19:36 +08:00
|
|
|
cp $(srcdir)/$$dir/*.h '$(DESTDIR)$(includedir_server)'/$$dir/ || exit; \
|
|
|
|
chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/$$dir/*.h || exit; \
|
2001-02-10 10:31:31 +08:00
|
|
|
done
|
|
|
|
|
2004-10-06 16:50:02 +08:00
|
|
|
installdirs:
|
2009-08-27 06:24:44 +08:00
|
|
|
$(MKDIR_P) '$(DESTDIR)$(includedir)/libpq' '$(DESTDIR)$(includedir_internal)/libpq'
|
|
|
|
$(MKDIR_P) $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS))
|
2001-02-10 10:31:31 +08:00
|
|
|
|
|
|
|
|
2000-07-07 05:33:45 +08:00
|
|
|
uninstall:
|
2005-12-10 05:19:36 +08: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 22:20:28 +08:00
|
|
|
# heuristic...
|
2005-12-10 05:19:36 +08:00
|
|
|
rm -rf $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS) *.h)
|
2001-08-28 22:20:28 +08:00
|
|
|
|
2000-07-07 05:33:45 +08:00
|
|
|
|
|
|
|
clean:
|
2010-01-05 09:06:57 +08:00
|
|
|
rm -f utils/fmgroids.h parser/gram.h utils/probes.h catalog/schemapg.h
|
2000-07-07 05:33:45 +08:00
|
|
|
|
|
|
|
distclean maintainer-clean: clean
|
2001-08-24 22:07:50 +08:00
|
|
|
rm -f pg_config.h dynloader.h pg_config_os.h stamp-h
|