On 17.04.2012 07:56, Pavel Stehule wrote:
> 2012/4/16 Heikki Linnakangas<heikki.linnakangas@enterprisedb.com>:
>> Ok, committed. I fixed the .PHONY line as Tom pointed out, and changed MSVC
>> install.pm to also copy the header file.
>
> Hello,
>
> it doesn't work for modules from contrib directory
>
> pavel ~/src/postgresql/contrib/check_plpgsql $ make
> 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 -I. -I.
> -I../../src/include -D_GNU_SOURCE -c -o check_plpgsql.o
> check_plpgsql.c
> check_plpgsql.c:16:21: fatal error: plpgsql.h: No such file or directory
> compilation terminated.
Hmm, the makefile rule I added copies the plpgsql.h file to
include/server directory when you do "make install". That makes the file
available when you build with USE_PGXS=1, without access to the source
tree, but doesn't change the situation when you build inside contrib.
If you plop the module directly to contrib, I guess you'll have to do
CFLAGS += -I$(top_srcdir)/src/pl/plpgsql/src
That's what pldebugger has always done.
-- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com