]> granicus.if.org Git - postgresql/blob - src/include/Makefile
Add a new reloption, user_catalog_table.
[postgresql] / src / include / Makefile
1 #-------------------------------------------------------------------------
2 #
3 # Makefile for src/include
4 #
5 # 'make install' installs whole contents of src/include.
6 #
7 # src/include/Makefile
8 #
9 #-------------------------------------------------------------------------
10
11 subdir = src/include
12 top_builddir = ../..
13 include $(top_builddir)/src/Makefile.global
14
15
16 all: pg_config.h pg_config_ext.h pg_config_os.h
17
18
19 # Subdirectories containing headers for server-side dev
20 SUBDIRS = access bootstrap catalog commands common datatype executor foreign \
21         lib libpq mb nodes optimizer parser postmaster regex replication \
22         rewrite storage tcop snowball snowball/libstemmer tsearch \
23         tsearch/dicts utils port port/win32 port/win32_msvc \
24         port/win32_msvc/sys port/win32/arpa port/win32/netinet \
25         port/win32/sys portability
26
27 # Install all headers
28 install: all installdirs
29 # These headers are needed by the public headers of the interfaces.
30         $(INSTALL_DATA) $(srcdir)/postgres_ext.h   '$(DESTDIR)$(includedir)'
31         $(INSTALL_DATA) $(srcdir)/libpq/libpq-fs.h '$(DESTDIR)$(includedir)/libpq'
32         $(INSTALL_DATA) pg_config.h     '$(DESTDIR)$(includedir)'
33         $(INSTALL_DATA) pg_config_ext.h '$(DESTDIR)$(includedir)'
34         $(INSTALL_DATA) pg_config_os.h  '$(DESTDIR)$(includedir)'
35         $(INSTALL_DATA) $(srcdir)/pg_config_manual.h '$(DESTDIR)$(includedir)'
36 # These headers are needed by the not-so-public headers of the interfaces.
37         $(INSTALL_DATA) $(srcdir)/c.h            '$(DESTDIR)$(includedir_internal)'
38         $(INSTALL_DATA) $(srcdir)/port.h         '$(DESTDIR)$(includedir_internal)'
39         $(INSTALL_DATA) $(srcdir)/postgres_fe.h  '$(DESTDIR)$(includedir_internal)'
40         $(INSTALL_DATA) $(srcdir)/libpq/pqcomm.h '$(DESTDIR)$(includedir_internal)/libpq'
41 # These headers are needed for server-side development
42         $(INSTALL_DATA) pg_config.h     '$(DESTDIR)$(includedir_server)'
43         $(INSTALL_DATA) pg_config_ext.h '$(DESTDIR)$(includedir_server)'
44         $(INSTALL_DATA) pg_config_os.h  '$(DESTDIR)$(includedir_server)'
45         $(INSTALL_DATA) utils/errcodes.h '$(DESTDIR)$(includedir_server)/utils'
46         $(INSTALL_DATA) utils/fmgroids.h '$(DESTDIR)$(includedir_server)/utils'
47 # We don't use INSTALL_DATA for performance reasons --- there are a lot of files
48         cp $(srcdir)/*.h '$(DESTDIR)$(includedir_server)'/ || exit; \
49         chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/*.h  || exit; \
50         for dir in $(SUBDIRS); do \
51           cp $(srcdir)/$$dir/*.h '$(DESTDIR)$(includedir_server)'/$$dir/ || exit; \
52           chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/$$dir/*.h  || exit; \
53         done
54 ifeq ($(vpath_build),yes)
55         for file in dynloader.h catalog/schemapg.h parser/gram.h utils/probes.h; do \
56           cp $$file '$(DESTDIR)$(includedir_server)'/$$file || exit; \
57           chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/$$file || exit; \
58         done
59 endif
60
61 installdirs:
62         $(MKDIR_P) '$(DESTDIR)$(includedir)/libpq' '$(DESTDIR)$(includedir_internal)/libpq'
63         $(MKDIR_P) $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS))
64
65
66 uninstall:
67         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)
68         rm -f $(addprefix '$(DESTDIR)$(includedir_internal)'/, c.h port.h postgres_fe.h libpq/pqcomm.h)
69 # heuristic...
70         rm -rf $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS) *.h)
71
72
73 clean:
74         rm -f utils/fmgroids.h utils/errcodes.h parser/gram.h utils/probes.h catalog/schemapg.h
75
76 distclean maintainer-clean: clean
77         rm -f pg_config.h pg_config_ext.h pg_config_os.h dynloader.h stamp-h stamp-ext-h