aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2007-01-26 22:23:50 +0000
committerBruce Momjian <bruce@momjian.us>2007-01-26 22:23:50 +0000
commit320abc3a95ec99a1df03cb95d277d3a9d5425b23 (patch)
tree3e32ddc507fb45084e81aa9038453c973419dace
parent4355d214c248c959cfbcd974b5e9ba8a6bf81074 (diff)
downloadpostgresql-320abc3a95ec99a1df03cb95d277d3a9d5425b23.tar.gz
postgresql-320abc3a95ec99a1df03cb95d277d3a9d5425b23.zip
Modify draft SGML instructions to use DRAFT=Y because recursion was
causing html to be called twice --- no way to exit the makefile after the recursion returns.
-rw-r--r--doc/src/sgml/Makefile20
-rw-r--r--doc/src/sgml/docguide.sgml4
2 files changed, 5 insertions, 19 deletions
diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile
index 3ed2654356c..ea0e197dceb 100644
--- a/doc/src/sgml/Makefile
+++ b/doc/src/sgml/Makefile
@@ -2,7 +2,7 @@
#
# PostgreSQL documentation makefile
#
-# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.91 2007/01/11 00:02:39 momjian Exp $
+# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.92 2007/01/26 22:23:49 momjian Exp $
#
#----------------------------------------------------------------------------
@@ -64,7 +64,7 @@ override SPFLAGS += -wall -wno-unused-param -wno-empty
## Man pages
##
-.PHONY: man draft
+.PHONY: html man draft clean
DEFAULTSECTION := $(sqlmansect_dummy)
@@ -86,8 +86,6 @@ man: postgres.sgml $(ALLSGML)
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
@@ -95,7 +93,7 @@ html: postgres.sgml $(ALLSGML) stylesheet.dsl
ifeq ($(vpath_build), yes)
@cp $(srcdir)/stylesheet.css .
endif
-ifndef DRAFT
+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,18 +101,6 @@ endif
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
diff --git a/doc/src/sgml/docguide.sgml b/doc/src/sgml/docguide.sgml
index 3dcec8d1401..3a763b07ceb 100644
--- a/doc/src/sgml/docguide.sgml
+++ b/doc/src/sgml/docguide.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/docguide.sgml,v 1.65 2007/01/11 00:02:39 momjian Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/docguide.sgml,v 1.66 2007/01/26 22:23:50 momjian Exp $ -->
<appendix id="docguide">
<title>Documentation</title>
@@ -546,7 +546,7 @@ checking for sgmlspl... sgmlspl
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>
+<prompt>doc/src/sgml$ </prompt><userinput>gmake DRAFT=Y html</userinput>
</screen>
</para>