VPATH builds fail

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: VPATH builds fail
Date: 2002-01-08 19:23:09
Message-ID: 2237.1010517789@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 add
override 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-01-08 19:47:45 Re: VPATH builds fail
Previous Message Bruce Momjian 2002-01-08 19:10:50 Strange results with date/interval arithmetic