changes to documentation build

Started by Peter Eisentrautalmost 16 years ago3 messages
#1Peter Eisentraut
peter_e@gmx.net
1 attachment(s)

Per thread starting here

http://archives.postgresql.org/pgsql-bugs/2010-03/msg00049.php

and ending here

http://archives.postgresql.org/pgsql-bugs/2010-03/msg00110.php

and earlier discussions of similar nature, here is a patch that
separates the documentation build and installation into separate
top-level targets 'make docs' and 'make install-docs', also dependencies
of 'make world' and 'make install-world'.

The significant change is that the documentation is no longer installed
by default (but the availability of the 'world' target might alleviate
that).

Please check it out.

Attachments:

pg-doc-build.patchtext/x-patch; charset=UTF-8; name=pg-doc-build.patchDownload
diff --git a/GNUmakefile.in b/GNUmakefile.in
index 1380901..51e7a96 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -9,33 +9,37 @@ top_builddir = .
 include $(top_builddir)/src/Makefile.global
 
 all:
-	$(MAKE) -C doc all
 	$(MAKE) -C src all
 	$(MAKE) -C config all
 	@echo "All of PostgreSQL successfully made. Ready to install."
 
+docs:
+	$(MAKE) -C doc all
+
 world:
-	$(MAKE) -C doc html
+	$(MAKE) -C doc all
 	$(MAKE) -C src all
 	$(MAKE) -C config all
 	$(MAKE) -C contrib all
-	@echo "PostgreSQL, contrib and HTML documentation successfully made. Ready to install."
+	@echo "PostgreSQL, contrib, and documentation successfully made. Ready to install."
 
 html man:
 	$(MAKE) -C doc $@
 
 install:
-	$(MAKE) -C doc $@
 	$(MAKE) -C src $@
 	$(MAKE) -C config $@
 	@echo "PostgreSQL installation complete."
 
+install-docs:
+	$(MAKE) -C doc install
+
 install-world:
 	$(MAKE) -C doc install
 	$(MAKE) -C src install
 	$(MAKE) -C config install
 	$(MAKE) -C contrib install
-	@echo "PostgreSQL and contrib installation complete."
+	@echo "PostgreSQL, contrib, and documentation installation complete."
 
 installdirs uninstall coverage:
 	$(MAKE) -C doc $@
@@ -139,5 +143,4 @@ distcheck: dist
 	rm -rf $(distdir) $(dummy)
 	@echo "Distribution integrity checks out."
 
-.PHONY: dist distdir distcheck
-unexport split-dist
+.PHONY: dist distdir distcheck docs install-docs
diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile
index f117f80..e7f4033 100644
--- a/doc/src/sgml/Makefile
+++ b/doc/src/sgml/Makefile
@@ -22,7 +22,9 @@ top_builddir = ../../..
 include $(top_builddir)/src/Makefile.global
 
 
-distprep: html man
+all: html man
+
+distprep: html distprep-man
 
 
 ifndef COLLATEINDEX
@@ -73,7 +75,7 @@ override SPFLAGS += -wall -wno-unused-param -wno-empty -wfully-tagged
 ## Man pages
 ##
 
-man: man-stamp
+man distprep-man: man-stamp
 
 man-stamp: stylesheet-man.xsl postgres.xml
 	$(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_MAN_FLAGS) $^
@@ -273,17 +275,12 @@ check: postgres.sgml $(ALMOSTALLSGML) check-tabs
 
 vpathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,. $(VPATH)))))
 
-found_html = $(wildcard html-stamp $(srcdir)/html-stamp)
+install: install-html
 
-ifneq ($(wildcard man-stamp $(srcdir)/man-stamp),)
-# SCO OpenServer's man system is sufficiently different to not bother.
 ifneq ($(PORTNAME), sco)
-found_man = yes
-endif
+install: install-man
 endif
 
-install: $(if $(found_html),install-html) $(if $(found_man),install-man)
-
 installdirs:
 	$(MKDIR_P) '$(DESTDIR)$(htmldir)'/html $(addprefix '$(DESTDIR)$(mandir)'/man, 1 3 $(sqlmansectnum))
 
@@ -324,8 +321,7 @@ fixed_sql_manpage_files = $(patsubst $(srcdir)/man7/%.7,fixedman/man$(sqlmansect
 
 fixed_manpage_files = $(fixed_nonsql_manpage_files) $(fixed_sql_manpage_files)
 
-all: all-man
-all-man: $(fixed_manpage_files)
+man: $(fixed_manpage_files)
 
 $(fixed_nonsql_manpage_files): fixedman/%: %
 	@$(MKDIR_P) $(dir $@)
@@ -335,7 +331,7 @@ $(fixed_sql_manpage_files): fixedman/man$(sqlmansectnum)/%.$(sqlmansect): man7/%
 	@$(MKDIR_P) $(dir $@)
 	$(fix_sqlmansectnum) $< >$@
 
-install-man: all-man
+install-man: man
 	cp -R $(sort $(dir $(fixed_manpage_files))) '$(DESTDIR)$(mandir)'
 
 clean: clean-man
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index ef20ee3..5da97c5 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -1543,8 +1543,9 @@ All of PostgreSQL is successfully made. Ready to install.
    </para>
 
   <para>
-   If you want to build everything that can be built, including the HTML
-   documentation and the Additional Modules, type instead:
+   If you want to build everything that can be built, including the
+   documentation (HTML and man pages), and the additional modules
+   (<filename>contrib</filename>), type instead:
 <screen>
 <userinput>gmake world</userinput>
 </screen>
@@ -1607,10 +1608,18 @@ PostgreSQL, contrib and HTML documentation successfully made. Ready to install.
    </para>
 
    <para>
+    To install the documentation (HTML and man pages), enter:
+<screen>
+<userinput>gmake install-docs</userinput>
+</screen>
+   </para>
+
+   <para>
     If you built the world above, type instead:
 <screen>
 <userinput>gmake install-world</userinput>
 </screen>
+    This also installs the documentation.
    </para>
 
    <para>
#2Robert Haas
robertmhaas@gmail.com
In reply to: Peter Eisentraut (#1)
Re: changes to documentation build

On Sat, Mar 27, 2010 at 5:23 AM, Peter Eisentraut <peter_e@gmx.net> wrote:

Per thread starting here

http://archives.postgresql.org/pgsql-bugs/2010-03/msg00049.php

and ending here

http://archives.postgresql.org/pgsql-bugs/2010-03/msg00110.php

and earlier discussions of similar nature, here is a patch that
separates the documentation build and installation into separate
top-level targets 'make docs' and 'make install-docs', also dependencies
of 'make world' and 'make install-world'.

The significant change is that the documentation is no longer installed
by default (but the availability of the 'world' target might alleviate
that).

Please check it out.

Looks great. Thanks for changing this!

...Robert

#3Josh Berkus
josh@agliodbs.com
In reply to: Peter Eisentraut (#1)
Re: changes to documentation build

On 3/27/10 2:23 AM, Peter Eisentraut wrote:

and earlier discussions of similar nature, here is a patch that
separates the documentation build and installation into separate
top-level targets 'make docs' and 'make install-docs', also dependencies
of 'make world' and 'make install-world'.

Yaaaaay! Will test.

--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com