[3/3] binutils: doc: make `make clean` clean more things

Message ID 20190917025731.300902-3-simon.marchi@polymtl.ca
State New
Headers show
Series
  • [1/3] binutils: doc: remove stale things from Makefile
Related show

Commit Message

Simon Marchi Sept. 17, 2019, 2:57 a.m.
There is a bunch of things left over after a `make clean` in the doc
directory.  This patch changes the Makefile so that everything built by
make is cleaned:

- man pages (the man_MANS variable)
- cxxfilt.man
- binutils.info

I am not sure why the last one was in MAINTAINERCLEANFILES.  It's
generated from binutils.texi using makeinfo, and it's not particularly
long to build, so I don't see why it shouldn't be cleaned like the other
files.

Note: with my automake 1,15.1 (built from source), I get a spurious diff
in Makefile.in, where the

  runstatedir = @runstatedir@

line gets removed.  I am not sure why, but I haven't included it.

binutils/ChangeLog:

	* doc/Makefile.am (MOSTLYCLEANFILES): Clean all man pages,
	cxxfilt.man and binutils.info.
	(MAINTAINERCLEANFILES): Remove.
	* doc/Makefile.in: Re-generate.
---
 binutils/doc/Makefile.am | 4 +---
 binutils/doc/Makefile.in | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

-- 
2.23.0

Patch

diff --git a/binutils/doc/Makefile.am b/binutils/doc/Makefile.am
index 9eabaa7a611d..803b1f8ca312 100644
--- a/binutils/doc/Makefile.am
+++ b/binutils/doc/Makefile.am
@@ -162,7 +162,7 @@  cxxfilt.man:	$(binutils_TEXI)
 		mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
 	rm -f $(DEMANGLER_NAME).pod
 
-MOSTLYCLEANFILES     = $(DEMANGLER_NAME).1
+MOSTLYCLEANFILES     = $(man_MANS).1 binutils.info cxxfilt.man
 
 $(DEMANGLER_NAME).1: cxxfilt.man Makefile
 	if test -f cxxfilt.man; then \
@@ -174,8 +174,6 @@  $(DEMANGLER_NAME).1: cxxfilt.man Makefile
 	    -e 's/cxxfilt/$(DEMANGLER_NAME)/' < $$man \
 		> $(DEMANGLER_NAME).1
 
-MAINTAINERCLEANFILES = binutils.info
-
 # Maintenance
 
 # We need it for the taz target in ../../Makefile.in.
diff --git a/binutils/doc/Makefile.in b/binutils/doc/Makefile.in
index 59e9f79c7cc7..8446a118b4fe 100644
--- a/binutils/doc/Makefile.in
+++ b/binutils/doc/Makefile.in
@@ -427,8 +427,7 @@  AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
 TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
 		    -I "$(top_srcdir)/../bfd/doc" -I ../../bfd/doc
 
-MOSTLYCLEANFILES = $(DEMANGLER_NAME).1
-MAINTAINERCLEANFILES = binutils.info
+MOSTLYCLEANFILES = $(man_MANS).1 binutils.info cxxfilt.man
 all: all-am
 
 .SUFFIXES:
@@ -722,7 +721,6 @@  distclean-generic:
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
-	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
 clean: clean-am
 
 clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am