ifdef USE_PGXS
PGXS := $(shell pg_config --pgxs)
include $(PGXS)

but something like

ifdef USE_PGXS
PG_CONFIG := pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)

to sync these invocations of pg_config with the ones in
Makefile.global.  I'm not sure though how to get this setting to
override the one in Makefile.global ... or should we just remove
that one?

That would break existing Makefiles that use the "please take the first pg_config in the path" feature, which rather make sense (it just means that you want the extension for your current postgresql).

However you may replace the other appearance with the following:

ifndef PG_CONFIG
PG_CONFIG       = pg_config
endif

So as to enable

        sh> make PG_CONFIG=/my/manual/path/to/pg_config install

invocations without fear to be overwritten, if some people do not like the path convention. Otherwise the following does the trick with a temporary replacement of the PATH environment variable just for one command under sh-compatible shells:

        sh> PATH=/my/manual/path/to:$PATH make install

and is shorter. This could be added to the documentation.

--
Fabien.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to