ruby-changes:66669
From: Nobuyoshi <ko1@a...>
Date: Sat, 3 Jul 2021 12:54:29 +0900 (JST)
Subject: [ruby-changes:66669] 1ac228378c (master): Use $ignore_error defined in mkmf.rb
https://git.ruby-lang.org/ruby.git/commit/?id=1ac228378c From 1ac228378cc0447220d229c1e1a7448e7b862b78 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 2 Jul 2021 20:07:23 +0900 Subject: Use $ignore_error defined in mkmf.rb --- enc/depend | 18 +++++++++--------- lib/mkmf.rb | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/enc/depend b/enc/depend index 892e961..7034d9c 100644 --- a/enc/depend +++ b/enc/depend @@ -18,6 +18,7 @@ https://github.com/ruby/ruby/blob/trunk/enc/depend#L18 % else % pathrep = proc {|path| path} % end +% ignore_error = $ignore_error VPATH = <%=%w[$(arch_hdrdir)/ruby $(hdrdir)/ruby $(srcdir) $(encsrcdir)].join(CONFIG["PATH_SEPARATOR"])%> LIBPATH = <%=libpathflag($DEFLIBPATH)%> @@ -73,12 +74,12 @@ $(LIBENC): $(ENCOBJS) https://github.com/ruby/ruby/blob/trunk/enc/depend#L74 @$(RM) $@ $(ECHO) linking statically-linked encoding library $@ $(Q) $(AR) $(ARFLAGS)$@ $(ENCOBJS) - @-$(RANLIB) $@ 2> /dev/null || true + @-$(RANLIB) $@<%=ignore_error%> $(LIBTRANS): $(TRANSOBJS) @$(RM) $@ $(ECHO) linking statically-linked transcoder library $@ $(Q) $(AR) $(ARFLAGS)$@ $(TRANSOBJS) - @-$(RANLIB) $@ 2> /dev/null || true + @-$(RANLIB) $@<%=ignore_error%> enc trans $(ENCSOS) $(TRANSSOS): config.status @@ -156,24 +157,23 @@ clean: https://github.com/ruby/ruby/blob/trunk/enc/depend#L157 % %w[$(ENCSOS) $(LIBENC) $(ENCOBJS) $(ENCCLEANOBJS) $(ENCCLEANLIBS) $(TRANSSOS) $(LIBTRANS) $(TRANSOBJS) $(TRANSCLEANOBJS) $(TRANSCLEANLIBS) $(ENC_TRANS_D) $(ENC_TRANS_SO_D)].each do |clean| $(Q)$(RM) <%=pathrep[clean]%> % end -% @ignore_error = $nmake ? '' : ' 2> /dev/null || true' % unless inplace $(Q)$(RM) enc/unicode/*/casefold.h enc/unicode/*/name2ctype.h $(Q)$(RM) enc/jis/props.h - -$(Q)$(RMDIR) enc/unicode<%=@ignore_error%> + -$(Q)$(RMDIR) enc/unicode<%=ignore_error%> % end % workdirs.reverse_each do|d| - -$(Q)$(RMDIR) <%=pathrep[d]%><%=@ignore_error%> + -$(Q)$(RMDIR) <%=pathrep[d]%><%=ignore_error%> % end clean-srcs: $(Q)$(RM) <%=pathrep['$(TRANSCSRCS)']%> - -$(Q)$(RMDIR) <%=pathrep['enc/trans']%><%=@ignore_error%> + -$(Q)$(RMDIR) <%=pathrep['enc/trans']%><%=ignore_error%> $(Q)$(RM) enc/unicode/*/casefold.h enc/unicode/*/name2ctype.h $(Q)$(RM) enc/jis/props.h - -$(Q)$(RMDIR) <%=pathrep['enc/unicode']%><%=@ignore_error%> - -$(Q)$(RMDIR) <%=pathrep['enc/props']%><%=@ignore_error%> - -$(Q)$(RMDIR) <%=pathrep['enc']%><%=@ignore_error%> + -$(Q)$(RMDIR) <%=pathrep['enc/unicode']%><%=ignore_error%> + -$(Q)$(RMDIR) <%=pathrep['enc/props']%><%=ignore_error%> + -$(Q)$(RMDIR) <%=pathrep['enc']%><%=ignore_error%> <%# vim: set ft=eruby noexpandtab ts=8 sw=2 : -%> diff --git a/lib/mkmf.rb b/lib/mkmf.rb index d7301d7..beba3c3 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -2497,7 +2497,7 @@ site-install-rb: install-rb https://github.com/ruby/ruby/blob/trunk/lib/mkmf.rb#L2497 mfile.print "$(ECHO) linking static-library $(@#{rsep})\n\t$(Q) " mfile.print "$(AR) #{config_string('ARFLAGS') || 'cru '}$@ $(OBJS)" config_string('RANLIB') do |ranlib| - mfile.print "\n\t-$(Q)#{ranlib} $(@) 2> /dev/null || true" + mfile.print "\n\t-$(Q)#{ranlib} $(@)#{$ignore_error}" end end mfile.print "\n\n" -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/