From: Cédric Villemain <cedric@2ndquadrant.com>
To: pgsql-hackers@postgresql.org
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Craig Ringer <craig@2ndquadrant.com>
Subject: Re: Bugfix and new feature for PGXS
Date: Tue, 25 Jun 2013 01:24:50 +0200
Message-ID: <201306250124.54610.cedric@2ndquadrant.com> (raw)
In-Reply-To: <51C8C5B2.6080609@dunslane.net>
References: <201306181552.36673.cedric@2ndquadrant.com>
<201306242202.04162.cedric@2ndquadrant.com>
<51C8C5B2.6080609@dunslane.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Le mardi 25 juin 2013 00:18:26, Andrew Dunstan a écrit :
> On 06/24/2013 04:02 PM, Cédric Villemain wrote:
> > WIth extension, we do have to set VPATH explicitely if we want to use
> > VPATH (note that contribs/extensions must not care that postgresql has
> > been built with or without VPATH set). My patches try to fix that.
>
> No, this is exactly what I'm objecting to. I want to be able to do:
>
> invoke_vpath_magic
> standard_make_commands_as_for_non_vpath
>
> Your patches have been designed to overcome your particular issues, but
> they don't meet the general case, IMNSHO. This is why I want to have
> more discussion about how vpath builds could work for PGXS modules.
The patch does not restrict anything, it is not supposed to lead to
regression.
The assignment of VPATH and srcdir are wrong in the PGXS case, the patch
correct them. You're still free to do "make VPATH=/mypath ..." the VPATH
provided won't be erased by the pgxs.mk logic.
> > So the point is to be able to do exactly that :
> >
> > $ mkdir /tmp/json_build && cd /tmp/json_build
> > $ make USE_PGXS=1 -f /path/to/json_build/Makefile
>
> It doesn't work:
>
> [andrew@emma vpath.json_build]$ PATH=../../inst.vpgxs.5706/bin:$PATH
> make -f `pwd`/../json_build/Makefile
> grep: json_build.control: No such file or directory
> grep: json_build.control: No such file or directory
> grep: json_build.control: No such file or directory
> grep: json_build.control: No such file or directory
> grep: json_build.control: No such file or directory
> grep: json_build.control: No such file or directory
> grep: json_build.control: No such file or directory
> grep: json_build.control: No such file or directory
> grep: json_build.control: No such file or directory
> grep: json_build.control: No such file or directory
> grep: json_build.control: No such file or directory
> gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
> -Wdeclaration-after-statement -Wendif-labels
> -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
> -fwrapv -fexcess-precision=standard -g -fpic -shared -o
> json_build.so -L/home/pgl/npgl/inst.vpgxs.5706/lib -Wl,--as-needed
> -Wl,-rpath,'/home/pgl/npgl/inst.vpgxs.5706/lib',--enable-new-dtags
> cp
>
> /home/andrew/pgl/extns/vpath.json_build/../json_build/sql/json_build.sql
> sql/json_build--.sql
> cp: cannot create regular file `sql/json_build--.sql': No such file
> or directory
> make: *** [sql/json_build--.sql] Error 1
> [andrew@emma vpath.json_build]$
Ah, you make the point : your Makefile does not support VPATH or I failed to
consider some cases.
It seems to me that :
EXTVERSION = $(shell grep default_version $(EXTENSION).control | sed -e
"s/default_version[[:space:]]*=[[:space:]]*'\([^']*\)'/\1/")
is not working. I'm going to check GNU Make guidelines about that case (should
$(command) be executed on each path in the VPATH or not ?)
[...]
thinking a bit more...
I suppose gmake expects the Makefile to list $(EXTENSION).control file as a
prerequisite (thus its paths will be known during make invocation and your
command will work)
--
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation
Attachments:
signature.asc (application/pgp-signature, 489B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: cedric@2ndquadrant.com, andrew@dunslane.net, craig@2ndquadrant.com
Subject: Re: Bugfix and new feature for PGXS
In-Reply-To: <201306250124.54610.cedric@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox