Debian Codegraph @

src/include/Makefile

raw
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_os.h
17
18
19 # Subdirectories containing installable headers
20 SUBDIRS = access archive bootstrap catalog commands common datatype \
21 executor fe_utils foreign jit \
22 lib libpq mb nodes optimizer parser partitioning postmaster \
23 regex replication rewrite \
24 statistics storage tcop snowball snowball/libstemmer tsearch \
25 tsearch/dicts utils port port/atomics port/win32 port/win32_msvc \
26 port/win32_msvc/sys port/win32/arpa port/win32/netinet \
27 port/win32/sys portability
28
29 # Install all headers
30 install: all installdirs
31 # These headers are needed by the public headers of the interfaces.
32 $(INSTALL_DATA) $(srcdir)/postgres_ext.h '$(DESTDIR)$(includedir)'
33 $(INSTALL_DATA) $(srcdir)/libpq/libpq-fs.h '$(DESTDIR)$(includedir)/libpq'
34 $(INSTALL_DATA) pg_config.h '$(DESTDIR)$(includedir)'
35 $(INSTALL_DATA) pg_config_os.h '$(DESTDIR)$(includedir)'
36 $(INSTALL_DATA) $(srcdir)/pg_config_manual.h '$(DESTDIR)$(includedir)'
37 # These headers are needed by the not-so-public headers of the interfaces.
38 $(INSTALL_DATA) $(srcdir)/c.h '$(DESTDIR)$(includedir_internal)'
39 $(INSTALL_DATA) $(srcdir)/port.h '$(DESTDIR)$(includedir_internal)'
40 $(INSTALL_DATA) $(srcdir)/postgres_fe.h '$(DESTDIR)$(includedir_internal)'
41 $(INSTALL_DATA) $(srcdir)/libpq/pqcomm.h '$(DESTDIR)$(includedir_internal)/libpq'
42 $(INSTALL_DATA) $(srcdir)/libpq/protocol.h '$(DESTDIR)$(includedir_internal)/libpq'
43 # These headers are needed for server-side development
44 $(INSTALL_DATA) pg_config.h '$(DESTDIR)$(includedir_server)'
45 $(INSTALL_DATA) pg_config_os.h '$(DESTDIR)$(includedir_server)'
46 $(INSTALL_DATA) nodes/nodetags.h '$(DESTDIR)$(includedir_server)/nodes'
47 $(INSTALL_DATA) utils/errcodes.h '$(DESTDIR)$(includedir_server)/utils'
48 $(INSTALL_DATA) utils/fmgroids.h '$(DESTDIR)$(includedir_server)/utils'
49 $(INSTALL_DATA) utils/fmgrprotos.h '$(DESTDIR)$(includedir_server)/utils'
50 $(INSTALL_DATA) $(srcdir)/*.h '$(DESTDIR)$(includedir_server)'
51 for dir in $(SUBDIRS); do \
52 $(INSTALL_DATA) $(srcdir)/$$dir/*.h '$(DESTDIR)$(includedir_server)'/$$dir || exit; \
53 done
54 ifeq ($(vpath_build),yes)
55 for file in storage/lwlocknames.h utils/probes.h utils/wait_event_types.h; do \
56 $(INSTALL_DATA) $$file '$(DESTDIR)$(includedir_server)'/$$file || exit; \
57 done
58 endif
59 $(MAKE) -C catalog install
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_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 libpq/protocol.h)
69 # heuristic...
70 rm -rf $(addprefix '$(DESTDIR)$(includedir_server)'/, $(SUBDIRS) *.h)
71 $(MAKE) -C catalog uninstall
72
73
74 clean:
75 rm -f utils/fmgroids.h utils/fmgrprotos.h utils/errcodes.h utils/header-stamp
76 rm -f utils/pgstat_wait_event.c utils/wait_event_funcs_data.c
77 rm -f storage/lwlocknames.h utils/probes.h utils/wait_event_types.h
78 rm -f nodes/nodetags.h nodes/header-stamp
79 $(MAKE) -C catalog clean
80
81 distclean: clean
82 rm -f pg_config.h pg_config_os.h stamp-h