summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2024-03-08 22:21:11 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2024-03-11 00:46:15 +0900
commit9f60fd9d893a8440edc8cffc3662f9087ecfbf8a (patch)
tree0e445a84536e1ccc143432f3bbb03a99873d8954
parent51f4f1414f3648637271612aff0ffb51dd95f699 (diff)
Ignore failures on removing ext sub directories
When multiple libraries exist in a subdirectory under `ext`, `rmdir -p` may fail, because other directories have not been removed yet or the parent directory has been removed by other `distclean`. `rmdir` in GNU coreutils has `--ignore-fail-on-non-empty` option for the former case but others may not, and the latter race condition is not avoidable anyway.
-rw-r--r--template/exts.mk.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/template/exts.mk.tmpl b/template/exts.mk.tmpl
index e04fb50bbe..ac6b280188 100644
--- a/template/exts.mk.tmpl
+++ b/template/exts.mk.tmpl
@@ -162,7 +162,7 @@ ext/extinit.<%=objext%>:
$(Q)<%= submake %><%=mflags%> V=$(V) $(@F)
% if /^(dist|real)clean$/ =~ tgt
$(Q)$(RM) <%=t[%r[\A(?:\.[^/]+/)?(?:[^/]+/){2}]]%>exts.mk
- $(Q)$(RMDIRS) $(@D)
+ -$(Q)$(RMDIRS) $(@D)
% end
% end
% end