Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS
authorMichael Paquier
Sun, 3 Feb 2019 08:48:35 +0000 (17:48 +0900)
committerMichael Paquier
Sun, 3 Feb 2019 08:48:35 +0000 (17:48 +0900)
commit946430da6a0b91cac5607758264f506d25b3321f
treed0b36d4206e19c72b1458d38877e2093b20cc4d0
parent904413637f8b04aab02cbe03173a1a0bdadc2b6b
Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to PGXS

Add PG_CFLAGS, PG_CXXFLAGS, and PG_LDFLAGS variables to pgxs.mk which
will be appended or prepended to the corresponding make variables.
Notably, there was previously no way to pass custom CXXFLAGS to third
party extension module builds, COPT and PROFILE supporting only CFLAGS
and LDFLAGS.

Backpatch all the way down to ease integration with existing
extensions.

Author: Christoph Berg
Reviewed-by: Andres Freund, Tom Lane, Michael Paquier
Discussion: https://postgr.es/m/20181113104005[email protected]
Backpatch-through: 9.4
doc/src/sgml/extend.sgml
src/makefiles/pgxs.mk