1 #-------------------------------------------------------------------------
3 # Makefile for src/include
5 # Install exported headers to the include directory (these headers are
6 # the minimal ones needed to build loadable backend extensions).
8 # $Header: /cvsroot/pgsql/src/include/Makefile,v 1.2 2000/07/19 16:29:58 petere Exp $
10 #-------------------------------------------------------------------------
14 include ../Makefile.global
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
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 .
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
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; \
43 # Automatically pick out the needed subdirectories for the include
46 $(mkinstalldirs) $(addprefix $(includedir)/, $(sort $(dir $(HEADERS))))
49 rm -f $(addprefix $(includedir)/, $(HEADERS))
52 rm -f utils/fmgroids.h parser/parse.h
54 distclean maintainer-clean: clean
55 rm -f config.h dynloader.h os.h stamp-h