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
|
|
|
#
|
2010-09-20 22:08:53 +02:00
|
|
|
# src/include/Makefile
|
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
|
|
|
|
|
|
|
|
2012-10-08 03:52:07 +02:00
|
|
|
all: pg_config.h pg_config_ext.h pg_config_os.h
|
2000-07-06 23:33:45 +02:00
|
|
|
|
|
|
|
|
2016-03-24 20:55:44 +01:00
|
|
|
# Subdirectories containing installable headers
|
|
|
|
SUBDIRS = access bootstrap catalog commands common datatype \
|
|
|
|
executor fe_utils foreign \
|
2013-02-26 21:27:30 +01:00
|
|
|
lib libpq mb nodes optimizer parser postmaster regex replication \
|
|
|
|
rewrite storage tcop snowball snowball/libstemmer tsearch \
|
2014-10-02 16:39:36 +02:00
|
|
|
tsearch/dicts utils port port/atomics port/win32 port/win32_msvc \
|
2013-02-26 21:27:30 +01:00
|
|
|
port/win32_msvc/sys port/win32/arpa port/win32/netinet \
|
|
|
|
port/win32/sys portability
|
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'
|
2012-10-08 03:52:07 +02:00
|
|
|
$(INSTALL_DATA) pg_config.h '$(DESTDIR)$(includedir)'
|
|
|
|
$(INSTALL_DATA) pg_config_ext.h '$(DESTDIR)$(includedir)'
|
|
|
|
$(INSTALL_DATA) pg_config_os.h '$(DESTDIR)$(includedir)'
|
2005-12-09 22:19:36 +01:00
|
|
|
$(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
|
2012-10-08 03:52:07 +02:00
|
|
|
$(INSTALL_DATA) pg_config.h '$(DESTDIR)$(includedir_server)'
|
|
|
|
$(INSTALL_DATA) pg_config_ext.h '$(DESTDIR)$(includedir_server)'
|
|
|
|
$(INSTALL_DATA) pg_config_os.h '$(DESTDIR)$(includedir_server)'
|
2011-02-04 15:28:06 +01:00
|
|
|
$(INSTALL_DATA) utils/errcodes.h '$(DESTDIR)$(includedir_server)/utils'
|
2009-07-20 22:38:55 +02:00
|
|
|
$(INSTALL_DATA) utils/fmgroids.h '$(DESTDIR)$(includedir_server)/utils'
|
2016-12-28 18:00:00 +01:00
|
|
|
$(INSTALL_DATA) utils/fmgrprotos.h '$(DESTDIR)$(includedir_server)/utils'
|
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
|
2011-11-10 19:52:54 +01:00
|
|
|
ifeq ($(vpath_build),yes)
|
2015-09-11 22:45:41 +02:00
|
|
|
for file in dynloader.h catalog/schemapg.h parser/gram.h storage/lwlocknames.h utils/probes.h; do \
|
2011-11-10 19:52:54 +01:00
|
|
|
cp $$file '$(DESTDIR)$(includedir_server)'/$$file || exit; \
|
|
|
|
chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/$$file || exit; \
|
|
|
|
done
|
|
|
|
endif
|
2001-02-10 03:31:31 +01:00
|
|
|
|
2004-10-06 10:50:02 +02:00
|
|
|
installdirs:
|
2009-08-27 00:24:44 +02:00
|
|
|
$(MKDIR_P) '$(DESTDIR)$(includedir)/libpq' '$(DESTDIR)$(includedir_internal)/libpq'
|
|
|
|
$(MKDIR_P) $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS))
|
2001-02-10 03:31:31 +01:00
|
|
|
|
|
|
|
|
2000-07-06 23:33:45 +02:00
|
|
|
uninstall:
|
2012-10-08 03:52:07 +02:00
|
|
|
rm -f $(addprefix '$(DESTDIR)$(includedir)'/, pg_config.h pg_config_ext.h pg_config_os.h pg_config_manual.h postgres_ext.h libpq/libpq-fs.h)
|
2005-12-09 22:19:36 +01:00
|
|
|
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:
|
2016-12-28 18:00:00 +01:00
|
|
|
rm -f utils/fmgroids.h utils/fmgrprotos.h utils/errcodes.h parser/gram.h utils/probes.h catalog/schemapg.h
|
2000-07-06 23:33:45 +02:00
|
|
|
|
|
|
|
distclean maintainer-clean: clean
|
2012-10-08 03:52:07 +02:00
|
|
|
rm -f pg_config.h pg_config_ext.h pg_config_os.h dynloader.h stamp-h stamp-ext-h
|