git-daemon: Simplify dead-children reaping logic
[gitweb.git] / Makefile
index 90c5a131be24463183a1f21cf3bf337ef00dd67c..53ab4b55369652ecbcbd7b2655a9dfc6aeb08336 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1064,7 +1064,7 @@ SHELL = $(SHELL_PATH)
 
 all:: shell_compatibility_test $(ALL_PROGRAMS) $(BUILT_INS) $(OTHER_PROGRAMS) GIT-BUILD-OPTIONS
 ifneq (,$X)
-       $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), $(RM) '$p';)
+       $(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), test '$p' -ef '$p$X' || $(RM) '$p';)
 endif
 
 all::