Re: doc/src/sgml/Makefile versus VPATH

Lists: pgsql-hackers
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: doc/src/sgml/Makefile versus VPATH
Date: 2009-10-06 16:24:32
Message-ID: 15680.1254846272@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

So isn't this still pretty broken? I notice that the clean and
distclean targets still use addprefix on a lot of temporary/intermediate
files that I would think get made in the build directory, not the source
directory. The references to man files in srcdir in
nonsql_manpage_files and adjacent macros seem a tad suspicious as well.

regards, tom lane


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: doc/src/sgml/Makefile versus VPATH
Date: 2009-10-06 16:41:21
Message-ID: 20091006164121.GK5929@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tom Lane wrote:
> So isn't this still pretty broken? I notice that the clean and
> distclean targets still use addprefix on a lot of temporary/intermediate
> files that I would think get made in the build directory, not the source
> directory.

Yeah, I noticed that too. I'm not too sure about it, because some of
those files we do want shipped in source tarballs; and they are
definitely cleaned in the builddir by maintainer-clean. I didn't want
to get into the detail of what's the ultimate distclean charter; my
immediate problem was that "make -C doc maintainer-clean" was not
getting rid of the stamp files and thus I was getting bit by the problem
that openjade was running all the time, even after I maintainer-cleaned.

By Peter's recent decree that tarballs are supposed to be built in
non-vpath-builds only, I am not really sure what should actually happen
here, both on build and on the various clean targets.

> The references to man files in srcdir in nonsql_manpage_files and
> adjacent macros seem a tad suspicious as well.

I agree, it probably merits more investigation.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: doc/src/sgml/Makefile versus VPATH
Date: 2009-10-06 16:56:58
Message-ID: 16122.1254848218@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> By Peter's recent decree that tarballs are supposed to be built in
> non-vpath-builds only, I am not really sure what should actually happen
> here, both on build and on the various clean targets.

I think that that means the Makefile can just assume that *every* built
file is built in the current directory, and $(srcdir) should only be
applied to non-derived files.

regards, tom lane


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: doc/src/sgml/Makefile versus VPATH
Date: 2009-10-06 19:44:24
Message-ID: 1254858264.15541.0.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, 2009-10-06 at 12:56 -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > By Peter's recent decree that tarballs are supposed to be built in
> > non-vpath-builds only, I am not really sure what should actually happen
> > here, both on build and on the various clean targets.
>
> I think that that means the Makefile can just assume that *every* built
> file is built in the current directory, and $(srcdir) should only be
> applied to non-derived files.

More or less, except when you are installing, you need to look in both
places for files to install (and preferably avoid installing both, I
think).


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: doc/src/sgml/Makefile versus VPATH
Date: 2009-10-06 20:00:50
Message-ID: 1254859250.15541.16.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, 2009-10-06 at 12:24 -0400, Tom Lane wrote:
> So isn't this still pretty broken? I notice that the clean and
> distclean targets still use addprefix on a lot of temporary/intermediate
> files that I would think get made in the build directory, not the source
> directory.

Yeah, those rules have "evolved" a bit. Basically, everything should be
in clean except the bits that go into the tarball, namely the final man
and html builds. I have committed some fixes. (It almost looks like
8.4 again now.)

> The references to man files in srcdir in
> nonsql_manpage_files and adjacent macros seem a tad suspicious as well.

Indeed. This only affects if you build your own man pages in a vpath
build, so it's not critical. I'll look at it later.