Re: PGXS on VPATH? - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: PGXS on VPATH?
Date
Msg-id Pine.LNX.4.64.0511071553550.874@briare.cri.ensmp.fr
Whole thread Raw
In response to Re: PGXS on VPATH?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Dear Alvaro,

sorry for this late response.

>> Is PGXS on VPATH builds supported?
>
> Probably not in the way you're thinking.  IIRC pgxs.mk explicitly resets
> VPATH, and I think it has to do that because any VPATH embedded in
> Makefile.global would represent what was done at the time of building
> the PG installation --- which has zip to do with where the PGXS-using
> software is located.
>
> It might work to explicitly set VPATH from the make command line:
>     make USE_PGXS=1 VPATH=whatever
> as this should override the assignments in the makefiles.

Indeed.

There were some kind of issue with VPATH so that it was scratched when 
building under pgxs.

ifdef PGXS
# We assume that we are in src/makefiles/, so top is ...
top_builddir := $(dir $(PGXS))../..
include $(top_builddir)/src/Makefile.global
top_srcdir = $(top_builddir)
srcdir = .
VPATH =
endif

Maybe something clever could be done with relative VPATHs, or by trying to 
translate prefixes? On the other hand, I'm not a VPATH fan;-)

-- 
Fabien.


pgsql-hackers by date:

Previous
From: Edwin Ramirez
Date:
Subject: Function with Variable number of parameters
Next
From: Alvaro Herrera
Date:
Subject: Re: Function with Variable number of parameters