building outside source tree - Mailing list pgsql-hackers

From Neil Conway
Subject building outside source tree
Date
Msg-id 87oeuzm4q4.fsf@mailbox.samurai.com
Whole thread Raw
Responses Re: building outside source tree
List pgsql-hackers
Building PostgreSQL outside the source tree is slightly broken:

(Using the current CVS HEAD code)

$ mkdir ~/test-pg-build
$ cd ~/test-pg-build
$ ../pgsql/configure
[ output omitted]
$ make
[ output omitted; make succeeds ]
$ touch ../pgsql/configure     # i.e. cvs up
$ make

The final make command invokes 'config.status --recheck', which
invokes '../pgsql/configure --no-create --no-recursion'. The re-run of
configure succeeds, but the rest of the make fails abruptly:

make: *** No rule to make target `src/Makefile.global.in', needed by
`src/Makefile.global'.  Stop.

When 'configure' has been updated, we use config.status to re-run
configure with the arguments that were previously specified. The
problem is caused by the '--no-create' flag passed to configure by
config.status: in configure.in we don't set the 'vpath_build' variable
if '--no-create' has been specified. 

(Therefore, when src/Makefile.global is recreated after configure is
re-run, the 'vpath_build' variable isn't set, and a vpath build
(i.e. a build outside the source tree) obviously fails.)

Any comments on how we should fix this?

-Neil



pgsql-hackers by date:

Previous
From: ow
Date:
Subject: Re: pg_restore and create FK without verification check
Next
From: Hannu Krosing
Date:
Subject: Re: Materialized views proposal