Thread: pgsql-server: Put path configuration information into a .h file instead

pgsql-server: Put path configuration information into a .h file instead

From
tgl@svr1.postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Put path configuration information into a .h file instead of cluttering
several different module Makefiles with it.  Also, do any adjustment
of installation paths during configure, rather than every time Makefile.global
is read.

Modified Files:
--------------
    pgsql-server:
        configure (r1.367 -> r1.368)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/configure.diff?r1=1.367&r2=1.368)
        configure.in (r1.356 -> r1.357)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/configure.in.diff?r1=1.356&r2=1.357)
    pgsql-server/src:
        Makefile.global.in (r1.185 -> r1.186)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/Makefile.global.in.diff?r1=1.185&r2=1.186)
    pgsql-server/src/backend/utils/fmgr:
        Makefile (r1.16 -> r1.17)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/fmgr/Makefile.diff?r1=1.16&r2=1.17)
    pgsql-server/src/interfaces/libpq:
        Makefile (r1.107 -> r1.108)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/interfaces/libpq/Makefile.diff?r1=1.107&r2=1.108)
        fe-connect.c (r1.269 -> r1.270)

(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/interfaces/libpq/fe-connect.c.diff?r1=1.269&r2=1.270)
    pgsql-server/src/port:
        Makefile (r1.11 -> r1.12)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/port/Makefile.diff?r1=1.11&r2=1.12)
        path.c (r1.10 -> r1.11)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/port/path.c.diff?r1=1.10&r2=1.11)

Re: pgsql-server: Put path configuration information

From
Neil Conway
Date:
Tom Lane wrote:
> Put path configuration information into a .h file instead of cluttering
> several different module Makefiles with it.

This breaks the tree for vpath builds:

make -C port all
/Users/neilc/local/bin/gcc -no-cpp-precomp -O0 -fno-strict-aliasing -g
-Wall -Wmissing-prototypes -Wmissing-declarations -I../../src/include
-I/Users/neilc/pgsql/src/include -I/sw/include  -c -o exec.o
/Users/neilc/pgsql/src/port/exec.c -MMD
/Users/neilc/local/bin/gcc -no-cpp-precomp -O0 -fno-strict-aliasing -g
-Wall -Wmissing-prototypes -Wmissing-declarations -I../../src/include
-I/Users/neilc/pgsql/src/include -I/sw/include  -c -o noblock.o
/Users/neilc/pgsql/src/port/noblock.c -MMD
echo "#define PGBINDIR \"/Users/neilc/local/pgsql-cvs/bin\""
 >pg_config_paths.h
echo "#define PGSHAREDIR \"/Users/neilc/local/pgsql-cvs/share\""
 >>pg_config_paths.h
echo "#define SYSCONFDIR \"/Users/neilc/local/pgsql-cvs/etc\""
 >>pg_config_paths.h
echo "#define INCLUDEDIR \"/Users/neilc/local/pgsql-cvs/include\""
 >>pg_config_paths.h
echo "#define PKGINCLUDEDIR \"/Users/neilc/local/pgsql-cvs/include\""
 >>pg_config_paths.h
echo "#define PKGLIBDIR \"/Users/neilc/local/pgsql-cvs/lib\""
 >>pg_config_paths.h
/Users/neilc/local/bin/gcc -no-cpp-precomp -O0 -fno-strict-aliasing -g
-Wall -Wmissing-prototypes -Wmissing-declarations -I../../src/include
-I/Users/neilc/pgsql/src/include -I/sw/include  -c -o path.o
/Users/neilc/pgsql/src/port/path.c -MMD
/Users/neilc/pgsql/src/port/path.c:20:29: pg_config_paths.h: No such
file or directory
/Users/neilc/pgsql/src/port/path.c: In function `get_share_path':
/Users/neilc/pgsql/src/port/path.c:116: error: `PGBINDIR' undeclared
(first use in this function)
/Users/neilc/pgsql/src/port/path.c:116: error: (Each undeclared
identifier is reported only once
/Users/neilc/pgsql/src/port/path.c:116: error: for each function it
appears in.)
/Users/neilc/pgsql/src/port/path.c:116: error: `PGSHAREDIR' undeclared
(first use in this function)
/Users/neilc/pgsql/src/port/path.c: In function `get_etc_path':
/Users/neilc/pgsql/src/port/path.c:135: error: `PGBINDIR' undeclared
(first use in this function)
/Users/neilc/pgsql/src/port/path.c:135: error: `SYSCONFDIR' undeclared
(first use in this function)
/Users/neilc/pgsql/src/port/path.c: In function `get_include_path':
/Users/neilc/pgsql/src/port/path.c:154: error: `PGBINDIR' undeclared
(first use in this function)
/Users/neilc/pgsql/src/port/path.c:154: error: `INCLUDEDIR' undeclared
(first use in this function)
/Users/neilc/pgsql/src/port/path.c: In function `get_pkginclude_path':
/Users/neilc/pgsql/src/port/path.c:173: error: `PGBINDIR' undeclared
(first use in this function)
/Users/neilc/pgsql/src/port/path.c:173: error: `PKGINCLUDEDIR'
undeclared (first use in this function)
/Users/neilc/pgsql/src/port/path.c: In function `get_pkglib_path':
/Users/neilc/pgsql/src/port/path.c:194: error: `PGBINDIR' undeclared
(first use in this function)
/Users/neilc/pgsql/src/port/path.c:194: error: `PKGLIBDIR' undeclared
(first use in this function)
make[2]: *** [path.o] Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2

-Neil


Re: pgsql-server: Put path configuration information

From
Tom Lane
Date:
Neil Conway <neilc@samurai.com> writes:
> This breaks the tree for vpath builds:

Drat, I forgot to test that case.  Will fix --- it just needs a -I added
to the src/port makefile, I think.

            regards, tom lane