Makefile: improve documentation targets

- add documentation targets to main Makefile
- ensure clean/maintainer-clean remove all generated documentation files
This commit is contained in:
Ian Barwick
2019-05-24 13:52:09 +09:00
parent 1d46261c24
commit 14b805d650
3 changed files with 24 additions and 3 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -260,7 +260,7 @@ deb-src http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main</programlisti
<para>
To build the documentation as HTML, execute:
<programlisting>
cd doc/ &amp;&amp; make</programlisting>
./configure &amp;&amp; make doc</programlisting>
</para>
<para>
The generated HTML files will be placed in the <filename>doc/html</filename>
@@ -271,14 +271,14 @@ deb-src http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main</programlisti
To build the documentation as a single HTML file, after configuring and building
the main &repmgr; source as described above, execute:
<programlisting>
cd doc/ &amp;&amp; make repmgr.html</programlisting>
./configure &amp;&amp; make doc-repmgr.html</programlisting>
</para>
<para>
To build the documentation as a PDF file, after configuring and building
the main &repmgr; source as described above, execute:
<programlisting>
cd doc/ &amp;&amp; make repmgr-A4.pdf</programlisting>
./configure &amp;&amp; make doc-repmgr-A4.pdf</programlisting>
</para>