diff --git a/Makefile.in b/Makefile.in index f8688313d..e0158cb9e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -37,8 +37,9 @@ ifeq ($(MAKECMDGOALS),distclean) SUBDIRS = doc include man scripts \ lib tools daemons libdm \ udev po liblvm test/api test - DISTCLEAN_DIRS += lcov_reports* endif +DISTCLEAN_DIRS += lcov_reports* +DISTCLEAN_TARGETS += config.cache config.log config.status make.tmpl include make.tmpl diff --git a/make.tmpl.in b/make.tmpl.in index 8b93bb137..b42358a51 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -306,11 +306,8 @@ clean: $(SUBDIRS.clean) $(SOURCES2:%.c=%.o) $(SOURCES2:%.c=%.d) $(SOURCES2:%.c=%.gcno) $(SOURCES2:%.c=%.gcda) distclean: clean $(SUBDIRS.distclean) - $(RM) -r $(DISTCLEAN_DIRS) - $(RM) $(DISTCLEAN_TARGETS) \ - config.cache config.log config.status \ - Makefile make.tmpl core \ - lvm-version.h + test -z "$(DISTCLEAN_DIRS)" || $(RM) -r $(DISTCLEAN_DIRS) + $(RM) $(DISTCLEAN_TARGETS) Makefile core .export.sym: .exported_symbols set -e; (echo "Base {"; echo " global:"; \