Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 1FC2B9FB2EA; Fri, 26 Jan 2007 18:30:57 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 61070-07; Fri, 26 Jan 2007 18:30:53 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from momjian.us (momjian.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id 857BB9FB1F1; Fri, 26 Jan 2007 18:30:53 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id l0QMUrp07574; Fri, 26 Jan 2007 17:30:53 -0500 (EST) From: Bruce Momjian Message-Id: <200701262230.l0QMUrp07574@momjian.us> Subject: Change draft gmake control To: PostgreSQL-patches , PostgreSQL-documentation Date: Fri, 26 Jan 2007 17:30:53 -0500 (EST) X-Mailer: ELM [version 2.4ME+ PL123] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ELM1169850653-24842-0_" Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/15 X-Sequence-Number: 4111 --ELM1169850653-24842-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" I had to change the draft flag for SGML from 'gmake draft html' to 'gmake DRAFT=Y html'. Internally the code used to recurse with DRAFT=Y, but I found there is no way to exit the makefile after the recursion returned, so I had to use this new syntax. Though more cumbersome, it is more logical because DRAFT is really a modifier, not a rule itself. For example, 'gmake html draft' would never have worked. Patch attached and applied. -- Bruce Momjian bruce@momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + --ELM1169850653-24842-0_ Content-Transfer-Encoding: 7bit Content-Type: text/x-diff Content-Disposition: inline; filename="/rtmp/diff" Index: Makefile =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/Makefile,v retrieving revision 1.91 diff -c -r1.91 Makefile *** Makefile 11 Jan 2007 00:02:39 -0000 1.91 --- Makefile 26 Jan 2007 22:19:58 -0000 *************** *** 64,70 **** ## Man pages ## ! .PHONY: man draft DEFAULTSECTION := $(sqlmansect_dummy) --- 64,70 ---- ## Man pages ## ! .PHONY: html man draft clean DEFAULTSECTION := $(sqlmansect_dummy) *************** *** 86,93 **** all: html - .PHONY: html - # This is run for all output formats because we need bookindex.sgml html: postgres.sgml $(ALLSGML) stylesheet.dsl @rm -f *.html --- 86,91 ---- *************** *** 95,101 **** ifeq ($(vpath_build), yes) @cp $(srcdir)/stylesheet.css . endif ! ifndef DRAFT # If not draft, re-run the this rule until HTML.index does not change @cmp -s HTML.index.start HTML.index || $(MAKE) $@ endif --- 93,99 ---- ifeq ($(vpath_build), yes) @cp $(srcdir)/stylesheet.css . endif ! ifneq ($(DRAFT), Y) # If not draft, re-run the this rule until HTML.index does not change @cmp -s HTML.index.start HTML.index || $(MAKE) $@ endif *************** *** 103,120 **** COLLATEINDEX := LC_ALL=C $(PERL) $(COLLATEINDEX) -f -g - # The draft rule calls gmake again and sets the DRAFT variable. - # This seems to be the only way to set gmake variables in a rule. - draft: - ifndef DRAFT - ifneq ($(MAKECMDGOALS), draft) - @$(MAKE) DRAFT="Y" $(MAKECMDGOALS) - else - # simulate $(MAKE) with no arguments - @$(MAKE) DRAFT="Y" all - endif - endif - # bookindex.sgml is required so there is a proper index for all output formats bookindex.sgml: HTML.index # create a dummy bookindex.html --- 101,106 ---- Index: docguide.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/docguide.sgml,v retrieving revision 1.65 diff -c -r1.65 docguide.sgml *** docguide.sgml 11 Jan 2007 00:02:39 -0000 1.65 --- docguide.sgml 26 Jan 2007 22:19:59 -0000 *************** *** 546,552 **** stages. If you do not care about the index, and just want to proof-read the output, use draft: ! doc/src/sgml$ gmake draft html --- 546,552 ---- stages. If you do not care about the index, and just want to proof-read the output, use draft: ! doc/src/sgml$ gmake DRAFT=Y html --ELM1169850653-24842-0_--