From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] SGML index build fix |
Date: | 2007-01-09 00:07:29 |
Message-ID: | 200701090007.l0907Te09118@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Peter Eisentraut wrote:
> Am Montag, 8. Januar 2007 05:10 schrieb Bruce Momjian:
> > Here is a patch that runs the build twice when HTML.index does not
> > exist, and once every time after that. This is not ideal, but it is a
> > start.
>
> The problem is that this requires two runs even to proof the documentation,
> which I think no one wants.
So what would the API be to signal you want a draft build?
gmake DRAFT="Y" html
I can do that.
> > ! # If HTML.index is zero length, create a dummy bookindex.sgml
> > ! test -s HTML.index || $(COLLATEINDEX) -o $@ -N
> > ! # If HTML.index is valid, create valid bookindex.sgml. This
> > ! # is required so the output has a proper index.
> > ! test ! -s HTML.index || $(COLLATEINDEX) -i 'bookindex' -o $@ $<
>
> Please indent the comments properly so they don't appear in the output.
Done.
>
> > ! HTML.index:
> > ! test -f HTML.index || (touch HTML.index && $(MAKE) $(MAKECMDGOALS))
>
> I think this is partially redundant. If HTML.index exists, then this
> rule will never be called.
Uh, wouldn't HTML.index be newer than bookindex.sgml after a build?
Also, I need the HTML.index dependency and I can't use 'ifeq' to
add/remove it because the test condition result will change during the
Makefile execution. So, HTML.index has to exist after the dependency
rule returns. Am I missing something?
I did replace the test -f with $if.
> > ! rm -f HTML.manifest *.html *.gif bookindex.skip
>
> I don't see bookindex.skip mentioned anywhere else. Left over from a
> previous version?
Sorry, removed.
Updated patch attached. This is a more complete solution that saves off
HTML.index before each jade run, and checks after if the new HTML.index
differs from the original, and if so, run it again. It also adds a
DRAFT 'make' option, and documents it. It also removes the
documentation about running it multiple times.
--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Attachment | Content-Type | Size |
---|---|---|
/pgpatches/sgml | text/x-diff | 4.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-01-09 00:14:21 | Re: [HACKERS] SGML index build fix |
Previous Message | Tom Lane | 2007-01-08 23:56:27 | Strange sort operators vs the regression tests |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-01-09 00:14:21 | Re: [HACKERS] SGML index build fix |
Previous Message | Magnus Hagander | 2007-01-08 20:33:06 | Re: README for vcbuild |