Skip to contentSkip to conversation

2.5.44 mrproper removes editor backup files

PATCH In review Mikael Pettersson 2 participants 2 messages Oct 20, 2002 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.5.44 mrproper removes editor backup files

Contrary to years of history and several explicit comments in Makefile that mrproper != distclean, 2.5.44 merged the two which causes mrproper to incorrectly remove editor backup files. Suggested fix below -- works for me.

/Mikael

Makefile renamed from Makefile.~1~ +5 -2
@@ -712,7 +712,11 @@
 #
 quiet_cmd_mrproper = RM  $$(MRPROPER_DIRS) + $$(MRPROPER_FILES)
 cmd_mrproper = rm -rf $(MRPROPER_DIRS) && rm -f $(MRPROPER_FILES)
-mrproper distclean: clean archmrproper
+mrproper: clean archmrproper
+	@echo '  Making $@ in the srctree'
+	$(call cmd,mrproper)
+
+distclean: mrproper
 	@echo '  Making $@ in the srctree'
 	@find . $(RCS_FIND_IGNORE) \
 	 	\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
@@ -720,7 +724,6 @@
 	 	-o -name '.*.rej' -o -size 0 \
 		-o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
 		-type f -print | xargs rm -f
-	$(call cmd,mrproper)
 
 # Generate tags for editors
 # ---------------------------------------------------------------------------
#1 lore raw
Quoted 3 lines · Mikael Pettersson

Contrary to years of history and several explicit comments in Makefile that mrproper != distclean, 2.5.44 merged the two which causes mrproper to incorrectly remove editor backup files.

Why do you need three levels of cleaning?
In other words what is it that make clean failed to clean in your case.

I know that we always used to say: make mrproper can cure everything. But make clean starts to get the power of make mrproper.

It makes sense to kill one of them, but make help needs an update though. You could argue if distclean=mrproper or mrproper=clean.

Sam