From be54b3777ff189e79661d8746d3f25b0564393d2 Mon Sep 17 00:00:00 2001 From: Andrew Gierth Date: Wed, 5 Sep 2018 22:01:21 +0100 Subject: Allow extensions to install built as well as unbuilt headers. Commit df163230b overlooked the case that an out-of-tree extension might need to build its header files (e.g. via ./configure). If it is also doing a VPATH build, the HEADERS_* rules in the original commit would then fail to find the files, since they would be looking only under $(srcdir) and not in the build directory. Fix by adding HEADERS_built and HEADERS_built_$(MODULE) which behave like DATA_built in that they look in the build dir rather than the source dir (and also make the files dependencies of the "all" target). No Windows support appears to be needed for this, since it is only relevant to out-of-tree builds (no support exists in Mkvcbuild.pm to build extension header files in any case). --- doc/src/sgml/extend.sgml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml index d5731621e7b..1b1adae1a63 100644 --- a/doc/src/sgml/extend.sgml +++ b/doc/src/sgml/extend.sgml @@ -1224,9 +1224,10 @@ include $(PGXS) HEADERS + HEADERS_built - files to install under + files to (optionally build and) install under prefix/include/server/$MODULEDIR/$MODULE_big @@ -1234,12 +1235,21 @@ include $(PGXS) HEADERS_$MODULE + HEADERS_built_$MODULE - files to install under + Files to install (after building if specified) under prefix/include/server/$MODULEDIR/$MODULE, where $MODULE must be a module name used - in MODULES or MODULE_big + in MODULES or MODULE_big. + + + It is legal to use both variables for the same module, or any + combination, unless you have two module names in the + MODULES list that differ only by the presence of a + prefix built_, which would cause ambiguity. In + that (hopefully unlikely) case, you should use only the + HEADERS_built_$MODULE variables. -- cgit v1.2.3