binutils: doc: make `make clean` clean more things
authorSimon Marchi <simon.marchi@polymtl.ca>
Wed, 18 Sep 2019 13:14:59 +0000 (09:14 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 18 Sep 2019 13:14:59 +0000 (09:14 -0400)
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/ChangeLog
binutils/doc/Makefile.am
binutils/doc/Makefile.in

index 5c424d62689326f3e75b65dd8d25398767784776..c26d2789fdbe9a4ae3b2264c5e08d34782b80f7b 100644 (file)
@@ -1,3 +1,10 @@
+2019-09-18  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * doc/Makefile.am (MOSTLYCLEANFILES): Clean all man pages,
+       cxxfilt.man and binutils.info.
+       (MAINTAINERCLEANFILES): Remove.
+       * doc/Makefile.in: Re-generate.
+
 2019-09-18  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * doc/Makefile.am: Remove references to binutils_TEXINFOS.
index 9eabaa7a611db43f870ad18bf0595b2893f7719a..c58fa689f929e611dda763e2a95e794086075673 100644 (file)
@@ -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) 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.
index 73600fb2efbf3b6696ab7a0c5fb8966baeb29932..3023c7bdd30e27b7254d62ab94e8943cf4753ba3 100644 (file)
@@ -426,8 +426,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) binutils.info cxxfilt.man
 all: all-am
 
 .SUFFIXES:
@@ -721,7 +720,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