]> granicus.if.org Git - postgresql/blob - src/include/Makefile
Delete the `remove-old-headers' target, as it is no longer useful. Patch
[postgresql] / src / include / Makefile
1 #-------------------------------------------------------------------------
2 #
3 # Makefile for src/include
4 #
5 # 'make install' installs whole contents of src/include.
6 #
7 # $PostgreSQL: pgsql/src/include/Makefile,v 1.17 2004/11/09 06:23:50 neilc Exp $
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 headers for server-side dev
20 SUBDIRS = access bootstrap catalog commands executor lib libpq mb \
21         nodes optimizer parser port regex rewrite storage tcop utils
22
23 # Install all headers
24 install: all installdirs
25 # These headers are needed by the public headers of the interfaces.
26         $(INSTALL_DATA) $(srcdir)/postgres_ext.h   $(DESTDIR)$(includedir)
27         $(INSTALL_DATA) $(srcdir)/libpq/libpq-fs.h $(DESTDIR)$(includedir)/libpq
28         $(INSTALL_DATA) pg_config.h    $(DESTDIR)$(includedir)
29         $(INSTALL_DATA) pg_config_os.h $(DESTDIR)$(includedir)
30         $(INSTALL_DATA) $(srcdir)/pg_config_manual.h $(DESTDIR)$(includedir)
31 # These headers are needed by the not-so-public headers of the interfaces.
32         $(INSTALL_DATA) $(srcdir)/c.h            $(DESTDIR)$(includedir_internal)
33         $(INSTALL_DATA) $(srcdir)/port.h         $(DESTDIR)$(includedir_internal)
34         $(INSTALL_DATA) $(srcdir)/postgres_fe.h  $(DESTDIR)$(includedir_internal)
35         $(INSTALL_DATA) $(srcdir)/libpq/pqcomm.h $(DESTDIR)$(includedir_internal)/libpq
36 # These headers are needed for server-side development
37         $(INSTALL_DATA) pg_config.h    $(DESTDIR)$(includedir_server)
38         $(INSTALL_DATA) pg_config_os.h $(DESTDIR)$(includedir_server)
39         for file in $(srcdir)/*.h; do \
40           $(INSTALL_DATA) $$file $(DESTDIR)$(includedir_server)/`basename $$file` || exit; \
41         done
42         for dir in $(SUBDIRS); do \
43           for file in $(srcdir)/$$dir/*.h; do \
44             $(INSTALL_DATA) $$file $(DESTDIR)$(includedir_server)/$$dir/`basename $$file` || exit; \
45           done \
46         done
47
48 installdirs:
49         $(mkinstalldirs) $(DESTDIR)$(includedir)/libpq $(DESTDIR)$(includedir_internal)/libpq
50         $(mkinstalldirs) $(addprefix $(DESTDIR)$(includedir_server)/, $(SUBDIRS))
51
52
53 uninstall:
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)
56 # heuristic...
57         rm -rf $(addprefix $(DESTDIR)$(includedir_server)/, $(SUBDIRS) *.h)
58
59
60 clean:
61         rm -f utils/fmgroids.h parser/parse.h
62
63 distclean maintainer-clean: clean
64         rm -f pg_config.h dynloader.h pg_config_os.h stamp-h