Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-09 Thread Bruce Momjian
Peter Eisentraut wrote: > Bruce Momjian wrote: > > > ! draft: > > > ! ifndef DRAFT > > > ! ifneq ($(MAKECMDGOALS), draft) > > How could this condition ever match? On first call, 'draft' might be set, but in the recursive call, this code will not be reached because DRAFT iss set.

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-09 Thread Bruce Momjian
Peter Eisentraut wrote: > Bruce Momjian wrote: > > > + ifndef DRAFT > > > + [EMAIL PROTECTED] -s HTML.index.start HTML.index || $(MAKE) $* > > > + endif > > Why are you using $*? This isn't a pattern rule. > Sorry, my mistake. Here is an patch to fix that. -- Bruce Momjian [EMAIL PROTECT

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-09 Thread Bruce Momjian
Peter Eisentraut wrote: > Bruce Momjian wrote: > > > ? %-A4.tex-ps: %.sgml $(ALLSGML) stylesheet.dsl bookindex.sgml > > > ? $(JADE.tex.call) -V texdvi-output -V '%paper-type%'=A4 -o $@ $< > > > + ifndef DRAFT > > > + [EMAIL PROTECTED] -s HTML.index.start HTML.index || $(MAKE) $* > > > + endif >

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-09 Thread Peter Eisentraut
Bruce Momjian wrote: > > ! draft: > > ! ifndef DRAFT > > ! ifneq ($(MAKECMDGOALS), draft) How could this condition ever match? > > ! # Call ourselves with the DRAFT value set.  This seems to be the only > > ! # way to set gmake variables in a rule. > > ! [EMAIL PROTECTED](MAKE) DRAFT="Y" $(MAKEC

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-09 Thread Peter Eisentraut
Bruce Momjian wrote: > > + ifndef DRAFT > > + [EMAIL PROTECTED] -s HTML.index.start HTML.index || $(MAKE) $* > > + endif Why are you using $*? This isn't a pattern rule. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-09 Thread Peter Eisentraut
Bruce Momjian wrote: > >   %-A4.tex-ps: %.sgml $(ALLSGML) stylesheet.dsl bookindex.sgml > >   $(JADE.tex.call) -V texdvi-output -V '%paper-type%'=A4 -o $@ $< > > + ifndef DRAFT > > + [EMAIL PROTECTED] -s HTML.index.start HTML.index || $(MAKE) $* > > + endif What is the point of that? -- Pete

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-09 Thread Bruce Momjian
Patch applied. --- Bruce Momjian wrote: > Tom Lane wrote: > > Bruce Momjian <[EMAIL PROTECTED]> writes: > > > Peter Eisentraut wrote: > > >> The problem is that this requires two runs even to proof the > > >> documentation,

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-08 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Peter Eisentraut wrote: > >> 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 >

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-08 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Peter Eisentraut wrote: >> 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'd vote for gmake d

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-08 Thread Peter Eisentraut
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

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-07 Thread Bruce Momjian
Peter Eisentraut wrote: > Tom Lane wrote: > > Perhaps even more to the point, what makes you think that someone > > will notice the warning? If the docs build is one step in an > > automated build process, this seems unlikely. > > Taking a closer look, it's pretty much guaranteed that no one will

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-07 Thread Gavin Sherry
On Sun, 7 Jan 2007, Tom Lane wrote: > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> Perhaps even more to the point, what makes you think that someone > >> will notice the warning? If the docs build is one step in an > >> automated build process, this seems unlikely. > > >

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-07 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Perhaps even more to the point, what makes you think that someone >> will notice the warning? If the docs build is one step in an >> automated build process, this seems unlikely. > Taking a closer look, it's pretty much guaranteed

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-07 Thread Peter Eisentraut
Tom Lane wrote: > Perhaps even more to the point, what makes you think that someone > will notice the warning? If the docs build is one step in an > automated build process, this seems unlikely. Taking a closer look, it's pretty much guaranteed that no one will see them, because the targets they

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-07 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Martijn van Oosterhout wrote: >> I don't know enough about the relevent tool to know if they actually >> generate a warning about whether they need to be rerun. In any case it >> seems a much better approach to simply run it again when needed rather >> th

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-07 Thread Bruce Momjian
Martijn van Oosterhout wrote: -- Start of PGP signed section. > On Sun, Jan 07, 2007 at 12:42:06AM -0500, Bruce Momjian wrote: > > Joshua D. Drake wrote: > > > On Sat, 2007-01-06 at 23:38 -0500, Tom Lane wrote: > > > > Everyone using these tools knows about the two-pass behavior. > > > > > > No, n

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-07 Thread Martijn van Oosterhout
On Sun, Jan 07, 2007 at 12:42:06AM -0500, Bruce Momjian wrote: > Joshua D. Drake wrote: > > On Sat, 2007-01-06 at 23:38 -0500, Tom Lane wrote: > > > Everyone using these tools knows about the two-pass behavior. > > > > No, not everyone knows. In fact I would argue that most do not know. It > > isn

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-06 Thread Bruce Momjian
Joshua D. Drake wrote: > On Sat, 2007-01-06 at 23:38 -0500, Tom Lane wrote: > > Bruce Momjian <[EMAIL PROTECTED]> writes: > > > The attached patch warns users when they create documentation output > > > that has no index, and suggests re-running 'gmake'. > > > > This is just useless noise. If it

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-06 Thread Joshua D. Drake
On Sat, 2007-01-06 at 23:38 -0500, Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > The attached patch warns users when they create documentation output > > that has no index, and suggests re-running 'gmake'. > > This is just useless noise. If it could tell the difference between a

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-06 Thread Bruce Momjian
Bruce Momjian wrote: > Tom Lane wrote: > > Bruce Momjian <[EMAIL PROTECTED]> writes: > > > The attached patch warns users when they create documentation output > > > that has no index, and suggests re-running 'gmake'. > > > > This is just useless noise. If it could tell the difference between an

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-06 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > The attached patch warns users when they create documentation output > > that has no index, and suggests re-running 'gmake'. > > This is just useless noise. If it could tell the difference between an > up-to-date index and a not-up-t

Re: [HACKERS] [PATCHES] SGML index build fix

2007-01-06 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > The attached patch warns users when they create documentation output > that has no index, and suggests re-running 'gmake'. This is just useless noise. If it could tell the difference between an up-to-date index and a not-up-to-date one, there might be s