git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Makefile: don't run rm without any files

From
MKMatt Kraai <kraai@ftbfs.org>
Date
Feb 13, 2013, 15:57 UTC
Message-ID
<1360771068-505-1-git-send-email-kraai@ftbfs.org>
From: Matt Kraai <matt.kraai@amo.abbott.com>

"rm -f -r" fails on QNX when not passed any files to remove. This breaks the clean target, since dep_dirs is empty. Avoid this by merging two rm command lines.

Signed-off-by: Matt Kraai <matt.kraai@amo.abbott.com>
---
 Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 5a2e02d..c2e3666 100644
--- a/Makefile
+++ b/Makefile
@@ -2414,8 +2414,7 @@ clean: profile-clean
 		builtin/*.o $(LIB_FILE) $(XDIFF_LIB) $(VCSSVN_LIB)
 	$(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X
 	$(RM) $(TEST_PROGRAMS)
-	$(RM) -r bin-wrappers
-	$(RM) -r $(dep_dirs)
+	$(RM) -r bin-wrappers $(dep_dirs)
 	$(RM) -r po/build/
 	$(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h $(ETAGS_TARGET) tags cscope*
 	$(RM) -r $(GIT_TARNAME) .doc-tmp-dir
-- 
1.8.1.3.570.g3074c9d
Next: Junio C Hamano
Message 1 of 5 in “Makefile: don't run rm without any files”
  1. Makefile: don't run rm without any filesMatt Kraai, Feb 13, 2013
  2. Junio C HamanoFeb 13, 2013
  3. Matt KraaiFeb 13, 2013
  4. Junio C HamanoFeb 13, 2013
  5. Jonathan NiederFeb 13, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.