diff options
author | Zack Weinberg <zackw@panix.com> | 2020-08-18 15:01:10 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-08-18 15:09:49 -0400 |
commit | 924ba17398344659e2f238e8464323679598ad8d (patch) | |
tree | 28e32f28374e9a581dce4f8c0c529e82f39714cb | |
parent | 17a7ec16a7b72a82286034c4e0cccf964a9a8afd (diff) | |
download | autoconf-924ba17398344659e2f238e8464323679598ad8d.tar.gz |
Delete a dummy ChangeLog in ‘make distclean’.
‘make distcheck’ from git may create a dummy ChangeLog file in the
build directory. Delete this on ‘make distclean’, but don’t delete
a real ChangeLog (generated by the gen-ChangeLog rule).
* Makefile.am (distclean-local): Delete ChangeLog if it is the dummy
created to pacify automake.
-rw-r--r-- | Makefile.am | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 4369a3ac..8c7ce7b6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -125,8 +125,14 @@ dist-hook: gen-ChangeLog # Arrange to remove the symlink to GNUmakefile in VPATH builds. # TODO remove this once automake vs. AC_CONFIG_LINKS issue is fixed. +# Delete ChangeLog if it is the dummy created by the rule above. +# The sed construct below distinguishes between a file whose sole +# contents are "dummy", and a file whose first line is "dummy" but then +# has other stuff, without reading the whole thing. distclean-local: if test x"$(VPATH)" != x ; then rm -f GNUmakefile ; fi + if test "x`sed -ne 'l;2q' ChangeLog 2> /dev/null`" = 'xdummy$$'; \ + then rm -f ChangeLog; fi include $(srcdir)/bin/local.mk include $(srcdir)/doc/local.mk |