Re: pgsql: Merge catalog/pg_foo_fn.h headers back into pg_foo.h headers.

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Postgres hackers <pgsql-hackers@postgresql.org>
Date: 2018-04-09T06:13:54Z
Lists: pgsql-hackers
On Sun, Apr 08, 2018 at 11:05:09PM -0400, Tom Lane wrote:
> Hm.  I'd tested "make -j all", but not going directly to "install".
> Does it help if you add
> 
> $(SUBDIRS:%=install-%-recurse): | submake-generated-headers
> 
> to src/Makefile?
>
> (That seems like a bit of a brute-force solution, though.  Anybody
> have a better answer?)

That takes care of the problem from the root of the directory, but when
doing the same from src/bin/ then the same issue shows up even if
src/Makefile is patched to handle install targets.

At the same time, trying to trigger a parallel install from src/backend
makes the build unhappy:
make: *** No rule to make target '../../src/common/libpgcommon_srv.a',
needed by 'postgres'.  Stop.
make: *** Waiting for unfinished jobs....

That may not be worth bothering, just mentioning.
--
Michael

Commits

  1. Fix pgxs.mk to not try to build generated headers in external builds.

  2. Fix partial-build problems introduced by having more generated headers.

  3. Further cleanup of client dependencies on src/include/catalog headers.

  4. Merge catalog/pg_foo_fn.h headers back into pg_foo.h headers.

  5. Switch client-side code to include catalog/pg_foo_d.h not pg_foo.h.