diff options
author | Zack Weinberg <zackw@panix.com> | 2020-08-21 13:43:50 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-08-21 13:53:18 -0400 |
commit | acf6fb022b8f0f3f63cb703ab5b8c9c05249ce8c (patch) | |
tree | 71493959b0781f410922e4dfbffaa25ff5454577 | |
parent | 1a5ed4566952f5b2ad854939357ff4b6ec2de180 (diff) | |
download | autoconf-acf6fb022b8f0f3f63cb703ab5b8c9c05249ce8c.tar.gz |
Fix ‘make distcheck’ failure due to generated manpages in build dir.
If we are doing a VPATH build and we generate the manpages,
they will be written to the build directory, and should be
deleted by ‘make distclean’; ‘make distcheck’ fails if this
is not done. However, if we are doing a build in the source
directory, the manpages might have been shipped to us and we
should *not* delete them in ‘make distclean’.
Correction to 5d3c99e56247d5a6496729931774cff08cf8dc0f.
* man/local.mk (distclean-local-man): New rule. Delete $(dist_man_MANS)
in VPATH builds only.
(MOSTLYCLEANFILES, .x.1): Don’t use globs to decide what to delete.
-rw-r--r-- | man/local.mk | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/man/local.mk b/man/local.mk index 05bf84a2..68cf5a8d 100644 --- a/man/local.mk +++ b/man/local.mk @@ -27,7 +27,6 @@ dist_man_MANS = \ man/ifnames.1 EXTRA_DIST += $(dist_man_MANS:.1=.x) man/common.x -MAINTAINERCLEANFILES += $(dist_man_MANS) # Depend on .version to get version number changes. # Don't depend on the generated scripts, because then we would try to @@ -47,7 +46,17 @@ man/ifnames.1: $(common_dep) $(binsrcdir)/ifnames.in remove_time_stamp = 's/^\(\.TH[^"]*"[^"]*"[^"]*\)"[^"]*"/\1/' -MOSTLYCLEANFILES += $(srcdir)/man/*.t +MOSTLYCLEANFILES += $(dist_man_MANS:=.t) $(dist_man_MANS:=a.t) \ + $(dist_man_MANS:=.tmp) +MAINTAINERCLEANFILES += $(dist_man_MANS) + +# To satisfy 'distcleancheck', we need to delete built manpages in +# 'distclean' when the build and source directories are not the same. +# We know we are in this case when 'man/common.x' doesn't exist. +distclean-local: distclean-local-man +distclean-local-man: + test -f man/common.x || rm -f $(dist_man_MANS) + SUFFIXES += .x .1 @@ -70,4 +79,4 @@ SUFFIXES += .x .1 else \ mv $@.t $@; \ fi - rm -f $@*.t + rm -f $@.t $@a.t |