diff --git a/Makefile.in b/Makefile.in
index ad6cc229..7d4498b1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -77,14 +77,31 @@ Makefile: Makefile.in config.status configure
Makefile.global: Makefile.global.in config.status configure
./config.status $@
+doc: repmgr_version.h
+ $(MAKE) -C doc html
+
+doc-repmgr.html: repmgr_version.h
+ $(MAKE) -C doc repmgr.html
+
+doc-repmgr-A4.pdf: repmgr_version.h
+ $(MAKE) -C doc repmgr-A4.pdf
+
+doc-repmgr-US.pdf: repmgr_version.h
+ $(MAKE) -C doc repmgr-US.pdf
+
+install-doc: doc
+ $(MAKE) -C doc install
+
clean: additional-clean
maintainer-clean: additional-maintainer-clean
additional-clean:
rm -f *.o
+ $(MAKE) -C doc clean
additional-maintainer-clean: clean
+ $(MAKE) -C doc maintainer-clean
rm -f config.status config.log
rm -f config.h
rm -f repmgr_version.h
@@ -104,3 +121,4 @@ installdirs-scripts:
.PHONY: installdirs-scripts
endif
+.PHONY: doc doc-repmgr.html doc-repmgr-A4.pdf doc-repmgr-US.pdf install-doc
diff --git a/doc/Makefile b/doc/Makefile
index 99540245..e035aba5 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -91,6 +91,9 @@ install: html
clean:
rm -f html-stamp
rm -f HTML.index $(GENERATED_XML)
+ rm -f repmgr.html
+ rm -f repmgr-A4.pdf
+ rm -f repmgr-US.pdf
maintainer-clean:
rm -rf html
diff --git a/doc/install-source.xml b/doc/install-source.xml
index 84d603a7..7991c4ff 100644
--- a/doc/install-source.xml
+++ b/doc/install-source.xml
@@ -260,7 +260,7 @@ deb-src http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main
To build the documentation as HTML, execute:
- cd doc/ && make
+ ./configure && make doc
The generated HTML files will be placed in the doc/html
@@ -271,14 +271,14 @@ deb-src http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main
- cd doc/ && make repmgr.html
+ ./configure && make doc-repmgr.html
To build the documentation as a PDF file, after configuring and building
the main &repmgr; source as described above, execute:
- cd doc/ && make repmgr-A4.pdf
+ ./configure && make doc-repmgr-A4.pdf