VPATH builds fail

Поиск
Список
Период
Сортировка
От Tom Lane
Тема VPATH builds fail
Дата
Msg-id 2237.1010517789@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: VPATH builds fail
Список pgsql-hackers
I experimented today (for the first time in a long time) with building
Postgres outside the source tree.  Didn't work:

make[3]: Entering directory `/home/users/t/tg/tgl/builddir/src/backend/bootstrap'
gcc -O1 -g -Wall -Wmissing-prototypes -Wmissing-declarations -g -I../../../src/include
-I/home/users/t/tg/tgl/pgsql/src/include  -c -o bootparse.o
/home/users/t/tg/tgl/pgsql/src/backend/bootstrap/bootparse.c
gcc -O1 -g -Wall -Wmissing-prototypes -Wmissing-declarations -g -I../../../src/include
-I/home/users/t/tg/tgl/pgsql/src/include  -c -o bootscanner.o
/home/users/t/tg/tgl/pgsql/src/backend/bootstrap/bootscanner.c
bootscanner.l:43: bootstrap_tokens.h: No such file or directory
make[3]: *** [bootscanner.o] Error 1

and similarly in src/interfaces/ecpg/preproc.

The problem was that I already had bison output files built in the
source tree.  If I remove those, the build goes through (with bison
output files built in the object tree).  However, since our source
distribution tarballs come with prebuilt bison outputs, this means
that a VPATH build from a source tarball won't work.

The simplest fix is probably to addoverride CPPFLAGS := -I$(srcdir) $(CPPFLAGS)
to the Makefiles in these two directories.  (I observe that plpgsql
already has this, which is why it fails to fail; backend/parser gets
around the same problem by installing symlinks.)  Any objections?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Gershon M. Wolfe"
Дата:
Сообщение: WAL FILES
Следующее
От: Tom Lane
Дата:
Сообщение: Re: VPATH builds fail