Modify SGML makefile to allow 'gmake draft' to build draft html ('draft'
authorBruce Momjian <bruce@momjian.us>
Sat, 27 Jan 2007 22:44:32 +0000 (22:44 +0000)
committerBruce Momjian <bruce@momjian.us>
Sat, 27 Jan 2007 22:44:32 +0000 (22:44 +0000)
is now a target, no longer a modifier).

doc/src/sgml/Makefile
doc/src/sgml/docguide.sgml

index 83dbf7874b914cfb465484c8c13ea34b1a30a040..7844b5ac8a2b8f0ad7d683449b81ec5d84f8bd4b 100644 (file)
@@ -2,7 +2,7 @@
 #
 # PostgreSQL documentation makefile
 #
-# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.93 2007/01/26 23:51:39 momjian Exp $
+# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.94 2007/01/27 22:44:32 momjian Exp $
 #
 #----------------------------------------------------------------------------
 
@@ -99,6 +99,12 @@ ifneq ($(DRAFT), Y)
 endif
 
 
+# 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:
+       @$(MAKE) DRAFT="Y" html
+
+
 COLLATEINDEX := LC_ALL=C $(PERL) $(COLLATEINDEX) -f -g
 
 # bookindex.sgml is required so there is a proper index for all output formats
index 3a763b07ceb1d9711084a3e00c7c467e49be9d78..6da9ee266f6f98d6a3cf0c5c8dde05a4df0779db 100644 (file)
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/docguide.sgml,v 1.66 2007/01/26 22:23:50 momjian Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/docguide.sgml,v 1.67 2007/01/27 22:44:32 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=Y html</userinput>
+<prompt>doc/src/sgml$ </prompt><userinput>gmake draft</userinput>
 </screen>
    </para>