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.4 2000/09/17 13:02:44 petere Exp $
10 #-------------------------------------------------------------------------
14 include $(top_builddir)/src/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 $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir)/$$i || exit; \
42 # Automatically pick out the needed subdirectories for the include
45 $(mkinstalldirs) $(addprefix $(DESTDIR)$(includedir)/, $(sort $(dir $(HEADERS))))
48 rm -f $(addprefix $(DESTDIR)$(includedir)/, $(HEADERS))
51 rm -f utils/fmgroids.h parser/parse.h
53 distclean maintainer-clean: clean
54 rm -f config.h dynloader.h os.h stamp-h