#
# 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 $
#
#----------------------------------------------------------------------------
## Man pages
##
-.PHONY: man draft
+.PHONY: html man draft clean
DEFAULTSECTION := $(sqlmansect_dummy)
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
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
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
-<!-- $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>
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>