Re: [pgsql-patches] [HACKERS] [PATCHES] SGML index build fix

2007-01-10 Thread Peter Eisentraut
Am Mittwoch, 10. Januar 2007 01:41 schrieb 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

Re: [pgsql-patches] [HACKERS] [PATCHES] SGML index build fix

2007-01-10 Thread Bruce Momjian
Peter Eisentraut wrote: Am Mittwoch, 10. Januar 2007 01:41 schrieb 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

Re: [pgsql-patches] [HACKERS] [PATCHES] SGML index build fix

2007-01-10 Thread Peter Eisentraut
Bruce Momjian wrote: The rule re-runs the makefile for the specific target, and the target modifies HTML.index, or it is only the HTML rule that modifies that. Only the html rule modifies HTML.index. That was a question I had. If that is true, it has to be: %-A4.tex-ps: %.sgml

Re: [pgsql-patches] [HACKERS] [PATCHES] SGML index build fix

2007-01-10 Thread Bruce Momjian
Peter Eisentraut wrote: Bruce Momjian wrote: The rule re-runs the makefile for the specific target, and the target modifies HTML.index, or it is only the HTML rule that modifies that. Only the html rule modifies HTML.index. That was a question I had. If that is true, it has to be:

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, which I

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? -- Peter

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

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 $(MAKECMDGOALS))  

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 What is the

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 PROTECTED]

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-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-08 Thread Bruce Momjian
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

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 draft

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 I'd vote for

Re: [PATCHES] SGML index build fix

2007-01-07 Thread Peter Eisentraut
Bruce Momjian wrote: The attached patch warns users when they create documentation output that has no index, and suggests re-running 'gmake'. ! # for some reason $wildcard expands too early, so we use 'test' $wildcard is expanded whenever you tell it to. What did you write? ! @test -f

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't

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, not everyone

Re: [PATCHES] SGML index build fix

2007-01-07 Thread Bruce Momjian
Peter Eisentraut wrote: Bruce Momjian wrote: The attached patch warns users when they create documentation output that has no index, and suggests re-running 'gmake'. ! # for some reason $wildcard expands too early, so we use 'test' $wildcard is expanded whenever you tell it to. What

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 than

Re: [PATCHES] SGML index build fix

2007-01-07 Thread Peter Eisentraut
Bruce Momjian wrote: I wrote: ifeq (,$(wildcard bookindex.valid)) echo Run 'gmake' again to generate output with a proper index endif but that warns on the first _two_ runs, meaning it expanded at the time the rule started, not at the time it hit that line. This

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
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 that no

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. Taking a closer

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 see

[PATCHES] SGML index build fix

2007-01-06 Thread Bruce Momjian
The attached patch warns users when they create documentation output that has no index, and suggests re-running 'gmake'. -- Bruce Momjian [EMAIL PROTECTED] EnterpriseDBhttp://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + Index:

Re: [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 some

Re: [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-to-date

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 up-to-date

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 an

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 could tell the