From: Bruce Momjian <bruce@momjian.us>
To: PostgreSQL-patches <pgsql-patches@postgresql.org>
To: PostgreSQL-documentation <pgsql-docs@postgresql.org>
Subject: Change draft gmake control
Date: Fri, 26 Jan 2007 17:30:53 -0500 (EST)
Message-ID: <200701262230.l0QMUrp07574@momjian.us> (raw)
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. +
Attachments:/rtmp/diff (text/x-diff, 2.5K) download
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 <literal>draft</>:
<screen>
! <prompt>doc/src/sgml$ </prompt><userinput>gmake draft html</userinput>
</screen>
</para>
--- 546,552 ----
stages. If you do not care about the index, and just want to
proof-read the output, use <literal>draft</>:
<screen>
! <prompt>doc/src/sgml$ </prompt><userinput>gmake DRAFT=Y html</userinput>
</screen>
</para>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: bruce@momjian.us, pgsql-patches@postgresql.org
Subject: Re: Change draft gmake control
In-Reply-To: <200701262230.l0QMUrp07574@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox