PGXS is preventing out-of-tree builds of control files
|Reported by:||strk||Owned by:||strk|
The pgxs.mk has, in the
install target, this block:
ifneq (,$(EXTENSION)) $(INSTALL_DATA) $(addprefix $(srcdir)/, $(addsuffix .control, $(EXTENSION))) '$(DESTDIR)$(datadir)/extension/' endif # EXTENSION
The code is basically prepending $(srcdir) to the .control file path and trying to install it, when EXTENSION variable is set.
In PostGIS we are generating the control files from the control.in files, so when building out-of-source-tree we have those files in the *build* directory, not the *source* directory.
I'd drop PGXS use completely to fix this issue, or at least we'd need to override the install rule