1 #-------------------------------------------------------------------------
3 # Makefile for src/include
5 # 'make install' installs whole contents of src/include.
7 # $PostgreSQL: pgsql/src/include/Makefile,v 1.20 2005/03/25 23:22:54 momjian Exp $
9 #-------------------------------------------------------------------------
13 include $(top_builddir)/src/Makefile.global
16 all: pg_config.h pg_config_os.h
19 # Subdirectories containing headers for server-side dev
20 SUBDIRS = access bootstrap catalog commands executor lib libpq mb \
21 nodes optimizer parser regex rewrite storage tcop utils \
22 port port/win32 port/win32/arpa port/win32/netinet port/win32/sys
25 install: all installdirs
26 # These headers are needed by the public headers of the interfaces.
27 $(INSTALL_DATA) $(srcdir)/postgres_ext.h $(DESTDIR)$(includedir)
28 $(INSTALL_DATA) $(srcdir)/libpq/libpq-fs.h $(DESTDIR)$(includedir)/libpq
29 $(INSTALL_DATA) pg_config.h $(DESTDIR)$(includedir)
30 $(INSTALL_DATA) pg_config_os.h $(DESTDIR)$(includedir)
31 $(INSTALL_DATA) $(srcdir)/pg_config_manual.h $(DESTDIR)$(includedir)
32 # These headers are needed by the not-so-public headers of the interfaces.
33 $(INSTALL_DATA) $(srcdir)/c.h $(DESTDIR)$(includedir_internal)
34 $(INSTALL_DATA) $(srcdir)/port.h $(DESTDIR)$(includedir_internal)
35 $(INSTALL_DATA) $(srcdir)/postgres_fe.h $(DESTDIR)$(includedir_internal)
36 $(INSTALL_DATA) $(srcdir)/libpq/pqcomm.h $(DESTDIR)$(includedir_internal)/libpq
37 # These headers are needed for server-side development
38 $(INSTALL_DATA) pg_config.h $(DESTDIR)$(includedir_server)
39 $(INSTALL_DATA) pg_config_os.h $(DESTDIR)$(includedir_server)
40 # We don't use INSTALL_DATA for performance reasons --- there are a lot of files
41 cp $(srcdir)/*.h $(DESTDIR)$(includedir_server)/ || exit; \
42 chmod $(INSTALL_DATA_MODE) $(DESTDIR)$(includedir_server)/*.h || exit; \
43 for dir in $(SUBDIRS); do \
44 cp $(srcdir)/$$dir/*.h $(DESTDIR)$(includedir_server)/$$dir/ || exit; \
45 chmod $(INSTALL_DATA_MODE) $(DESTDIR)$(includedir_server)/$$dir/*.h || exit; \
49 $(mkinstalldirs) $(DESTDIR)$(includedir)/libpq $(DESTDIR)$(includedir_internal)/libpq
50 $(mkinstalldirs) $(addprefix $(DESTDIR)$(includedir_server)/, $(SUBDIRS))
54 rm -f $(addprefix $(DESTDIR)$(includedir)/, pg_config.h pg_config_os.h postgres_ext.h libpq/libpq-fs.h)
55 rm -f $(addprefix $(DESTDIR)$(includedir_internal)/, c.h postgres_fe.h libpq/pqcomm.h)
57 rm -rf $(addprefix $(DESTDIR)$(includedir_server)/, $(SUBDIRS) *.h)
61 rm -f utils/fmgroids.h parser/parse.h
63 distclean maintainer-clean: clean
64 rm -f pg_config.h dynloader.h pg_config_os.h stamp-h