public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] binutils: doc: move back binutils.info to MAINTAINERCLEANFILES
@ 2020-03-06 16:26 Simon Marchi
  0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2020-03-06 16:26 UTC (permalink / raw)
  To: binutils; +Cc: Simon Marchi

In commit 2b44a6a237 (" binutils: doc: make `make clean` clean more
things"), I moved binutils.info to the MOSTLYCLEANFILES, which made it
get removed by "make clean".

Because generating binutils.info requires makeinfo, and we do not want
to require makeinfo when building from the tarball, binutils.info should
not get removed by "make clean" (otherwise, it won't be included in the
tarball).

This patch puts it back in MAINTAINERCLEANFILES, so that it only gets
cleaned if you use "make maintainer-clean".

Tested by building a source release and confirming that binutils.info is
present.

binutils/ChangeLog:

	PR 25491
	* doc/Makefile.am: Move binutils.info to MAINTAINERCLEANFILES.
	* doc/Makefile.in: Re-generate.
---
 binutils/doc/Makefile.am | 4 +++-
 binutils/doc/Makefile.in | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/binutils/doc/Makefile.am b/binutils/doc/Makefile.am
index a1e07ec246..2f93d4588e 100644
--- a/binutils/doc/Makefile.am
+++ b/binutils/doc/Makefile.am
@@ -162,7 +162,9 @@ cxxfilt.man:	$(binutils_TEXI)
 		mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
 	rm -f $(DEMANGLER_NAME).pod
 
-MOSTLYCLEANFILES     = $(man_MANS) binutils.info cxxfilt.man
+MOSTLYCLEANFILES = $(man_MANS) cxxfilt.man
+
+MAINTAINERCLEANFILES = binutils.info
 
 $(DEMANGLER_NAME).1: cxxfilt.man Makefile
 	if test -f cxxfilt.man; then \
diff --git a/binutils/doc/Makefile.in b/binutils/doc/Makefile.in
index b0e7b7b6c8..a02b9633bf 100644
--- a/binutils/doc/Makefile.in
+++ b/binutils/doc/Makefile.in
@@ -429,7 +429,8 @@ 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 = $(man_MANS) binutils.info cxxfilt.man
+MOSTLYCLEANFILES = $(man_MANS) cxxfilt.man
+MAINTAINERCLEANFILES = binutils.info
 all: all-am
 
 .SUFFIXES:
@@ -723,6 +724,7 @@ 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
-- 
2.25.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-03-06 16:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-06 16:26 [PATCH] binutils: doc: move back binutils.info to MAINTAINERCLEANFILES Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).