Separate targets "make docs" and "make install-docs" for the documentation

It is no longer installed by default, but included in "make world"/"make
install-world".  Documentation updated accordingly.

Also, fix vpathsearch function to work when calling make install-docs
without previous make docs.
This commit is contained in:
Peter Eisentraut 2010-03-30 00:10:46 +00:00
parent 3f76f9613d
commit 29ccc32c30
3 changed files with 33 additions and 25 deletions

View File

@ -1,7 +1,7 @@
# #
# PostgreSQL top level makefile # PostgreSQL top level makefile
# #
# $PostgreSQL: pgsql/GNUmakefile.in,v 1.57 2010/01/29 01:06:18 adunstan Exp $ # $PostgreSQL: pgsql/GNUmakefile.in,v 1.58 2010/03/30 00:10:46 petere Exp $
# #
subdir = subdir =
@ -9,33 +9,37 @@ top_builddir = .
include $(top_builddir)/src/Makefile.global include $(top_builddir)/src/Makefile.global
all: all:
$(MAKE) -C doc all
$(MAKE) -C src all $(MAKE) -C src all
$(MAKE) -C config all $(MAKE) -C config all
@echo "All of PostgreSQL successfully made. Ready to install." @echo "All of PostgreSQL successfully made. Ready to install."
docs:
$(MAKE) -C doc all
world: world:
$(MAKE) -C doc html $(MAKE) -C doc all
$(MAKE) -C src all $(MAKE) -C src all
$(MAKE) -C config all $(MAKE) -C config all
$(MAKE) -C contrib 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: html man:
$(MAKE) -C doc $@ $(MAKE) -C doc $@
install: install:
$(MAKE) -C doc $@
$(MAKE) -C src $@ $(MAKE) -C src $@
$(MAKE) -C config $@ $(MAKE) -C config $@
@echo "PostgreSQL installation complete." @echo "PostgreSQL installation complete."
install-docs:
$(MAKE) -C doc install
install-world: install-world:
$(MAKE) -C doc install $(MAKE) -C doc install
$(MAKE) -C src install $(MAKE) -C src install
$(MAKE) -C config install $(MAKE) -C config install
$(MAKE) -C contrib install $(MAKE) -C contrib install
@echo "PostgreSQL and contrib installation complete." @echo "PostgreSQL, contrib, and documentation installation complete."
installdirs uninstall coverage: installdirs uninstall coverage:
$(MAKE) -C doc $@ $(MAKE) -C doc $@
@ -139,5 +143,4 @@ distcheck: dist
rm -rf $(distdir) $(dummy) rm -rf $(distdir) $(dummy)
@echo "Distribution integrity checks out." @echo "Distribution integrity checks out."
.PHONY: dist distdir distcheck .PHONY: dist distdir distcheck docs install-docs
unexport split-dist

View File

@ -2,7 +2,7 @@
# #
# PostgreSQL documentation makefile # PostgreSQL documentation makefile
# #
# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.138 2010/02/05 19:31:18 momjian Exp $ # $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.139 2010/03/30 00:10:46 petere Exp $
# #
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
@ -22,7 +22,9 @@ top_builddir = ../../..
include $(top_builddir)/src/Makefile.global include $(top_builddir)/src/Makefile.global
distprep: html man all: html man
distprep: html distprep-man
ifndef COLLATEINDEX ifndef COLLATEINDEX
@ -73,7 +75,7 @@ override SPFLAGS += -wall -wno-unused-param -wno-empty -wfully-tagged
## Man pages ## Man pages
## ##
man: man-stamp man distprep-man: man-stamp
man-stamp: stylesheet-man.xsl postgres.xml man-stamp: stylesheet-man.xsl postgres.xml
$(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_MAN_FLAGS) $^ $(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_MAN_FLAGS) $^
@ -271,18 +273,13 @@ check: postgres.sgml $(ALMOSTALLSGML) check-tabs
## Install ## Install
## ##
vpathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,. $(VPATH))))) vpathsearch = `for f in $(addsuffix /$(1),$(subst :, ,. $(VPATH))); do test -r $$f && echo $$f && break; done`
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) ifneq ($(PORTNAME), sco)
found_man = yes install: install-man
endif endif
endif
install: $(if $(found_html),install-html) $(if $(found_man),install-man)
installdirs: installdirs:
$(MKDIR_P) '$(DESTDIR)$(htmldir)'/html $(addprefix '$(DESTDIR)$(mandir)'/man, 1 3 $(sqlmansectnum)) $(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) fixed_manpage_files = $(fixed_nonsql_manpage_files) $(fixed_sql_manpage_files)
all: all-man man: $(fixed_manpage_files)
all-man: $(fixed_manpage_files)
$(fixed_nonsql_manpage_files): fixedman/%: % $(fixed_nonsql_manpage_files): fixedman/%: %
@$(MKDIR_P) $(dir $@) @$(MKDIR_P) $(dir $@)
@ -335,7 +331,7 @@ $(fixed_sql_manpage_files): fixedman/man$(sqlmansectnum)/%.$(sqlmansect): man7/%
@$(MKDIR_P) $(dir $@) @$(MKDIR_P) $(dir $@)
$(fix_sqlmansectnum) $< >$@ $(fix_sqlmansectnum) $< >$@
install-man: all-man install-man: man
cp -R $(sort $(dir $(fixed_manpage_files))) '$(DESTDIR)$(mandir)' cp -R $(sort $(dir $(fixed_manpage_files))) '$(DESTDIR)$(mandir)'
clean: clean-man clean: clean-man

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.343 2010/03/17 17:12:31 petere Exp $ --> <!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.344 2010/03/30 00:10:46 petere Exp $ -->
<chapter id="installation"> <chapter id="installation">
<title><![%standalone-include[<productname>PostgreSQL</>]]> <title><![%standalone-include[<productname>PostgreSQL</>]]>
@ -1543,8 +1543,9 @@ All of PostgreSQL is successfully made. Ready to install.
</para> </para>
<para> <para>
If you want to build everything that can be built, including the HTML If you want to build everything that can be built, including the
documentation and the Additional Modules, type instead: documentation (HTML and man pages), and the additional modules
(<filename>contrib</filename>), type instead:
<screen> <screen>
<userinput>gmake world</userinput> <userinput>gmake world</userinput>
</screen> </screen>
@ -1606,11 +1607,19 @@ PostgreSQL, contrib and HTML documentation successfully made. Ready to install.
be granted. be granted.
</para> </para>
<para>
To install the documentation (HTML and man pages), enter:
<screen>
<userinput>gmake install-docs</userinput>
</screen>
</para>
<para> <para>
If you built the world above, type instead: If you built the world above, type instead:
<screen> <screen>
<userinput>gmake install-world</userinput> <userinput>gmake install-world</userinput>
</screen> </screen>
This also installs the documentation.
</para> </para>
<para> <para>