OSDN Git Service

Add distprep target to take some of the job of the release_prep script.
[pg-rex/syncrep.git] / src / include / Makefile
1 #-------------------------------------------------------------------------
2 #
3 # Makefile for src/include
4 #
5 # Install exported headers to the include directory (these headers are
6 # the minimal ones needed to build loadable backend extensions).
7 #
8 # $Header: /cvsroot/pgsql/src/include/Makefile,v 1.2 2000/07/19 16:29:58 petere Exp $
9 #
10 #-------------------------------------------------------------------------
11
12 subdir = src/include
13 top_builddir = ../..
14 include ../Makefile.global
15
16
17 HEADERS := os.h config.h c.h postgres.h postgres_ext.h fmgr.h \
18         libpq/pqcomm.h libpq/libpq-fs.h lib/dllist.h \
19         utils/geo_decls.h utils/elog.h utils/fmgroids.h utils/palloc.h \
20         access/attnum.h executor/spi.h commands/trigger.h
21
22
23 all: $(HEADERS)
24
25
26 # These rules are necessary in case someone installs the include tree
27 # before building the backend tree. Very messy.
28 utils/fmgroids.h: $(top_builddir)/src/backend/utils/fmgroids.h
29         cd utils && rm -f fmgroids.h && $(LN_S) ../$(top_builddir)/src/backend/utils/fmgroids.h .
30
31 # This file is built in the backend tree, but we need to keep track of
32 # the dependencies here.
33 $(top_builddir)/src/backend/utils/fmgroids.h: $(top_srcdir)/src/backend/utils/Gen_fmgrtab.sh catalog/pg_proc.h
34         $(MAKE) -C $(dir $@) fmgroids.h
35
36
37 install: all installdirs
38         @for i in $(HEADERS); do \
39           echo "$(INSTALL_DATA) $(srcdir)/$$i $(includedir)/$$i"; \
40           $(INSTALL_DATA) $(srcdir)/$$i $(includedir)/$$i; \
41         done
42
43 # Automatically pick out the needed subdirectories for the include
44 # tree.
45 installdirs:
46         $(mkinstalldirs) $(addprefix $(includedir)/, $(sort $(dir $(HEADERS))))
47
48 uninstall:
49         rm -f $(addprefix $(includedir)/, $(HEADERS))
50
51 clean:
52         rm -f utils/fmgroids.h parser/parse.h
53
54 distclean maintainer-clean: clean
55         rm -f config.h dynloader.h os.h stamp-h