Re: VPATH builds fail - Mailing list pgsql-hackers

From Tom Lane
Subject Re: VPATH builds fail
Date
Msg-id 8078.1010521689@sss.pgh.pa.us
Whole thread Raw
In response to Re: VPATH builds fail  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: VPATH builds fail  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
I said:
> I have to take that back: the bison outputs are rebuilt in the source
> tree, as indeed they should be.  I'm now fairly confused about why
> the first build attempt failed and the second succeeded.

The difference appears to be that when bison is run in the source dir,
its output contains lines like
#line 121 "bootscanner.l"

However, when it's run during a VPATH build, its output contains lines
like
#line 121 "/home/postgres/pgsql/src/backend/bootstrap/bootscanner.l"

evidently because bison is invoked with a full path to the .y file in
this case.

There is *no* difference in the #include commands, but apparently the
#line directives affect gcc's default search path for include files.

Net result: I'm back to my original statement: VPATH builds will not
work with a source distribution tarball.  Any objections to the
-I$(srcdir) trick?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: VPATH builds fail
Next
From: Peter Eisentraut
Date:
Subject: Re: VPATH builds fail