# HG changeset patch # User Mike Miller # Date 1467758738 25200 # Node ID 21c12b837089d16bb52b5e5942bc85faa15c03af # Parent 26c0e65e6b7751ea4a45a4492df7eb2b68ac0bc7 build: don't delete distributed docs on 'make clean' or 'make distclean' (bug #45646) * Makefile.am (clean-aminfo): Disable built-in Automake target that deletes Texinfo documentation on 'make clean'. * doc/module.mk (doc-maintainer-clean): Delete all built Texinfo documentation on 'make maintainer-clean'. * doc/interpreter/module.mk (doc_DISTCLEANFILES): Remove $(OCTAVE_HTML_STAMP) from the list. diff -r 26c0e65e6b77 -r 21c12b837089 Makefile.am --- a/Makefile.am Tue Jul 05 12:15:04 2016 -0700 +++ b/Makefile.am Tue Jul 05 15:45:38 2016 -0700 @@ -429,6 +429,12 @@ maintainer-clean-local: doc-maintainer-clean +## The 'clean-aminfo' target is defined by Automake >= 1.11. We want to +## distribute all Texinfo docs with the source distribution and not delete +## them on 'clean', so we override this target to do nothing by default. + +clean-aminfo: + define move_if_change_rule if [ -s $(1) ]; then \ ${SHELL} ${top_srcdir}/build-aux/move-if-change $(1) $(2); \ diff -r 26c0e65e6b77 -r 21c12b837089 doc/interpreter/module.mk --- a/doc/interpreter/module.mk Tue Jul 05 12:15:04 2016 -0700 +++ b/doc/interpreter/module.mk Tue Jul 05 15:45:38 2016 -0700 @@ -350,9 +350,6 @@ $(LOGOS) \ $(TXI_SRC) -doc_DISTCLEANFILES += \ - $(OCTAVE_HTML_STAMP) - doc_MAINTAINERCLEANFILES += \ AUTHORS \ $(BUILT_DOC_IMAGES) \ diff -r 26c0e65e6b77 -r 21c12b837089 doc/module.mk --- a/doc/module.mk Tue Jul 05 12:15:04 2016 -0700 +++ b/doc/module.mk Tue Jul 05 15:45:38 2016 -0700 @@ -69,3 +69,4 @@ doc-maintainer-clean: doc-distclean rm -f $(doc_MAINTAINERCLEANFILES) + rm -rf $(DVIS) $(HTMLS) $(PDFS) $(PSS)