22#
33# PostgreSQL documentation makefile
44#
5- # $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.91 2007/01/11 00:02:39 momjian Exp $
5+ # $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.92 2007/01/26 22:23:49 momjian Exp $
66#
77# ----------------------------------------------------------------------------
88
@@ -64,7 +64,7 @@ override SPFLAGS += -wall -wno-unused-param -wno-empty
6464# # Man pages
6565# #
6666
67- .PHONY : man draft
67+ .PHONY :html man draft clean
6868
6969DEFAULTSECTION :=$(sqlmansect_dummy )
7070
@@ -86,35 +86,21 @@ man: postgres.sgml $(ALLSGML)
8686
8787all : html
8888
89- .PHONY : html
90-
9189# This is run for all output formats because we need bookindex.sgml
9290html : postgres.sgml$(ALLSGML ) stylesheet.dsl
9391@rm -f* .html
9492$(JADE ) $(JADEFLAGS ) $(SPFLAGS ) $(SGMLINCLUDE ) $(CATALOG ) -d stylesheet.dsl -i output-html -t sgml$<
9593ifeq ($(vpath_build ) , yes)
9694@cp $(srcdir)/stylesheet.css .
9795endif
98- ifndef DRAFT
96+ ifneq ( $( DRAFT ) , Y)
9997# If not draft, re-run the this rule until HTML.index does not change
10098@cmp -s HTML.index.start HTML.index || $(MAKE) $@
10199endif
102100
103101
104102COLLATEINDEX := LC_ALL=C$(PERL ) $(COLLATEINDEX ) -f -g
105103
106- # The draft rule calls gmake again and sets the DRAFT variable.
107- # This seems to be the only way to set gmake variables in a rule.
108- draft :
109- ifndef DRAFT
110- ifneq ($(MAKECMDGOALS ) , draft)
111- @$(MAKE) DRAFT="Y" $(MAKECMDGOALS)
112- else
113- # simulate $(MAKE) with no arguments
114- @$(MAKE) DRAFT="Y" all
115- endif
116- endif
117-
118104# bookindex.sgml is required so there is a proper index for all output formats
119105bookindex.sgml : HTML.index
120106# create a dummy bookindex.html