Skip to content

Commit 29ccc32

Browse files
committed
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.
1 parent 3f76f96 commit 29ccc32

File tree

3 files changed

+33
-25
lines changed

3 files changed

+33
-25
lines changed

GNUmakefile.in

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,45 @@
11
#
22
# PostgreSQL top level makefile
33
#
4-
# $PostgreSQL: pgsql/GNUmakefile.in,v 1.57 2010/01/29 01:06:18 adunstan Exp $
4+
# $PostgreSQL: pgsql/GNUmakefile.in,v 1.58 2010/03/30 00:10:46 petere Exp $
55
#
66

77
subdir =
88
top_builddir = .
99
include $(top_builddir)/src/Makefile.global
1010

1111
all:
12-
$(MAKE) -C doc all
1312
$(MAKE) -C src all
1413
$(MAKE) -C config all
1514
@echo "All of PostgreSQL successfully made. Ready to install."
1615

16+
docs:
17+
$(MAKE) -C doc all
18+
1719
world:
18-
$(MAKE) -C doc html
20+
$(MAKE) -C doc all
1921
$(MAKE) -C src all
2022
$(MAKE) -C config all
2123
$(MAKE) -C contrib all
22-
@echo "PostgreSQL, contrib and HTML documentation successfully made. Ready to install."
24+
@echo "PostgreSQL, contrib, and documentation successfully made. Ready to install."
2325

2426
html man:
2527
$(MAKE) -C doc $@
2628

2729
install:
28-
$(MAKE) -C doc $@
2930
$(MAKE) -C src $@
3031
$(MAKE) -C config $@
3132
@echo "PostgreSQL installation complete."
3233

34+
install-docs:
35+
$(MAKE) -C doc install
36+
3337
install-world:
3438
$(MAKE) -C doc install
3539
$(MAKE) -C src install
3640
$(MAKE) -C config install
3741
$(MAKE) -C contrib install
38-
@echo "PostgreSQL and contrib installation complete."
42+
@echo "PostgreSQL, contrib, and documentation installation complete."
3943

4044
installdirs uninstall coverage:
4145
$(MAKE) -C doc $@
@@ -139,5 +143,4 @@ distcheck: dist
139143
rm -rf $(distdir) $(dummy)
140144
@echo "Distribution integrity checks out."
141145

142-
.PHONY: dist distdir distcheck
143-
unexport split-dist
146+
.PHONY: dist distdir distcheck docs install-docs

doc/src/sgml/Makefile

+10-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# PostgreSQL documentation makefile
44
#
5-
# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.138 2010/02/05 19:31:18 momjian Exp $
5+
# $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.139 2010/03/30 00:10:46 petere Exp $
66
#
77
#----------------------------------------------------------------------------
88

@@ -22,7 +22,9 @@ top_builddir = ../../..
2222
include $(top_builddir)/src/Makefile.global
2323

2424

25-
distprep: html man
25+
all: html man
26+
27+
distprep: html distprep-man
2628

2729

2830
ifndef COLLATEINDEX
@@ -73,7 +75,7 @@ override SPFLAGS += -wall -wno-unused-param -wno-empty -wfully-tagged
7375
## Man pages
7476
##
7577

76-
man: man-stamp
78+
man distprep-man: man-stamp
7779

7880
man-stamp: stylesheet-man.xsl postgres.xml
7981
$(XSLTPROC) $(XSLTPROCFLAGS) $(XSLTPROC_MAN_FLAGS) $^
@@ -271,19 +273,14 @@ check: postgres.sgml $(ALMOSTALLSGML) check-tabs
271273
## Install
272274
##
273275

274-
vpathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,. $(VPATH)))))
276+
vpathsearch = `for f in $(addsuffix /$(1),$(subst :, ,. $(VPATH))); do test -r $$f && echo $$f && break; done`
275277

276-
found_html = $(wildcard html-stamp $(srcdir)/html-stamp)
278+
install: install-html
277279

278-
ifneq ($(wildcard man-stamp $(srcdir)/man-stamp),)
279-
# SCO OpenServer's man system is sufficiently different to not bother.
280280
ifneq ($(PORTNAME), sco)
281-
found_man = yes
282-
endif
281+
install: install-man
283282
endif
284283

285-
install: $(if $(found_html),install-html) $(if $(found_man),install-man)
286-
287284
installdirs:
288285
$(MKDIR_P) '$(DESTDIR)$(htmldir)'/html $(addprefix '$(DESTDIR)$(mandir)'/man, 1 3 $(sqlmansectnum))
289286

@@ -324,8 +321,7 @@ fixed_sql_manpage_files = $(patsubst $(srcdir)/man7/%.7,fixedman/man$(sqlmansect
324321

325322
fixed_manpage_files = $(fixed_nonsql_manpage_files) $(fixed_sql_manpage_files)
326323

327-
all: all-man
328-
all-man: $(fixed_manpage_files)
324+
man: $(fixed_manpage_files)
329325

330326
$(fixed_nonsql_manpage_files): fixedman/%: %
331327
@$(MKDIR_P) $(dir $@)
@@ -335,7 +331,7 @@ $(fixed_sql_manpage_files): fixedman/man$(sqlmansectnum)/%.$(sqlmansect): man7/%
335331
@$(MKDIR_P) $(dir $@)
336332
$(fix_sqlmansectnum) $< >$@
337333

338-
install-man: all-man
334+
install-man: man
339335
cp -R $(sort $(dir $(fixed_manpage_files))) '$(DESTDIR)$(mandir)'
340336

341337
clean: clean-man

doc/src/sgml/installation.sgml

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.343 2010/03/17 17:12:31 petere Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.344 2010/03/30 00:10:46 petere Exp $ -->
22

33
<chapter id="installation">
44
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -1543,8 +1543,9 @@ All of PostgreSQL is successfully made. Ready to install.
15431543
</para>
15441544

15451545
<para>
1546-
If you want to build everything that can be built, including the HTML
1547-
documentation and the Additional Modules, type instead:
1546+
If you want to build everything that can be built, including the
1547+
documentation (HTML and man pages), and the additional modules
1548+
(<filename>contrib</filename>), type instead:
15481549
<screen>
15491550
<userinput>gmake world</userinput>
15501551
</screen>
@@ -1606,11 +1607,19 @@ PostgreSQL, contrib and HTML documentation successfully made. Ready to install.
16061607
be granted.
16071608
</para>
16081609

1610+
<para>
1611+
To install the documentation (HTML and man pages), enter:
1612+
<screen>
1613+
<userinput>gmake install-docs</userinput>
1614+
</screen>
1615+
</para>
1616+
16091617
<para>
16101618
If you built the world above, type instead:
16111619
<screen>
16121620
<userinput>gmake install-world</userinput>
16131621
</screen>
1622+
This also installs the documentation.
16141623
</para>
16151624

16161625
<para>

0 commit comments

Comments
 (0)