From 01fd348847a22cee75426373799ebc2b1b797209 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 12 Jan 2025 22:42:06 +0900 Subject: [PATCH 01/17] Win32: Fix @ in middle of commands `@` is not a command, and cannot be placed after `||`. --- win32/Makefile.sub | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index edbe2a340209d3..c27419c9905b63 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -1196,12 +1196,12 @@ ext/clean.sub ext/distclean.sub ext/realclean.sub \ $(MAKE) $(MFLAGS) $(@F) & \ cd %CD% & \ $(RMDIRS) %I \ - ))) || @ + ))) || $(NULLCMD) ext/distclean ext/realclean .bundle/distclean .bundle/realclean:: $(Q)cd $(@D) 2>nul && (for /R $(EXTS) %I in (exts.mk*) \ - do $(Q)(del %I & rmdir %~dpI)) || @ - -$(Q)rmdir $(@D) 2> nul || @ + do $(Q)(del %I & rmdir %~dpI)) || $(NULLCMD) + -$(Q)rmdir $(@D) 2> nul || $(NULLCMD) .bundle/realclean:: @$(RMALL) $(tooldir)/bunlder/*.lock $(srcdir)/.bundle From 9cdee9db9b3bfc58f773912c072ce7ab78a7d724 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 10 Jan 2025 11:55:09 +0900 Subject: [PATCH 02/17] Win32: Fix rm.bat removing non existent file --- win32/rm.bat | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/win32/rm.bat b/win32/rm.bat index 500a4abe2e5562..8cffd663c81558 100755 --- a/win32/rm.bat +++ b/win32/rm.bat @@ -8,11 +8,12 @@ if "%1" == "--debug" (shift & set PROMPT=$E[34m+$E[m$S & echo on & goto :optloop :begin if "%1" == "" goto :end set p=%1 +shift set p=%p:/=\% -if exist "%p%" del /q "%p%" > nul +if not exist "%p%" goto :begin +del /q "%p%" > nul && goto :begin if "%recursive%" == "1" for /D %%I in (%p%) do ( rd /s /q %%I ) -shift goto :begin :end From bb76e65f5696e936f72aa2ee0d17b5087f4a26ad Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 10 Jan 2025 13:21:48 +0900 Subject: [PATCH 03/17] Win32: Add `DLEXT` for clean-spec --- win32/Makefile.sub | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index c27419c9905b63..a8ad28cb1a7d4e 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -435,6 +435,7 @@ EXTSTATIC = OBJEXT = obj ASMEXT = asm +DLEXT = so INSTALLED_LIST= .installed.list @@ -872,7 +873,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub #define THREAD_IMPL_H "$(THREAD_IMPL_H)" #define THREAD_IMPL_SRC "$(THREAD_IMPL_SRC)" #define LOAD_RELATIVE 1 -#define DLEXT ".so" +#define DLEXT ".$(DLEXT)" !if "$(libdir_basename)" != "lib" #define LIBDIR_BASENAME "$(libdir_basename)" !endif @@ -985,7 +986,7 @@ s,@STATIC@,$(STATIC),;t t s,@CCDLFLAGS@,,;t t s,@LDSHARED@,$(LDSHARED),;t t s,@SOEXT@,dll,;t t -s,@DLEXT@,so,;t t +s,@DLEXT@,$(DLEXT),;t t s,@LIBEXT@,lib,;t t s,@STRIP@,$(STRIP),;t t s,@ENCSTATIC@,$(ENCSTATIC),;t t From b0b8eb6a31fbe484319c9fd042433094e0e69c93 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 10 Jan 2025 21:17:02 +0900 Subject: [PATCH 04/17] Win32: Fix removing symlink Try `rd` first for symlink to a directory; `del` attemps to remove all files under the target directory, instead of the symlink itself. --- win32/rm.bat | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/win32/rm.bat b/win32/rm.bat index 8cffd663c81558..8263dadd28272e 100755 --- a/win32/rm.bat +++ b/win32/rm.bat @@ -11,7 +11,11 @@ set p=%1 shift set p=%p:/=\% if not exist "%p%" goto :begin -del /q "%p%" > nul && goto :begin + +::- Try `rd` first for symlink to a directory; `del` attemps to remove all +::- files under the target directory, instead of the symlink itself. +(rd /q "%p%" || del /q "%p%") 2> nul && goto :begin + if "%recursive%" == "1" for /D %%I in (%p%) do ( rd /s /q %%I ) From 00d05dfca5584537d4581420c26ce0864d3eff96 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 10 Jan 2025 21:19:36 +0900 Subject: [PATCH 05/17] Win32: Remove extra suffix for sub-make --- win32/Makefile.sub | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index a8ad28cb1a7d4e..2670e775dccc41 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -1193,8 +1193,8 @@ ext/clean.sub ext/distclean.sub ext/realclean.sub \ call set n=%I && \ call set n=%n:%CD%\$(@D)\=% && \ call set n=%n:\.=% && \ - call echo $(@F)ing %n:\=/% & \ - $(MAKE) $(MFLAGS) $(@F) & \ + call echo $(@F:.sub=)ing %n:\=/% & \ + $(MAKE) $(MFLAGS) $(@F:.sub=) & \ cd %CD% & \ $(RMDIRS) %I \ ))) || $(NULLCMD) From a6c5d290abaa232a60c21fa2a48ac0228de8270b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 11 Jan 2025 01:06:34 +0900 Subject: [PATCH 06/17] Win32: Clean prism - intermediate source files - timestamp files - build directories --- win32/Makefile.sub | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 2670e775dccc41..79fbdb30c411e9 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -1168,12 +1168,39 @@ clean-local:: $(Q)$(RM) miniruby.rc $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc $(Q)$(RM) *.map *.pdb *.ilk *.exp $(RUBYDEF) ext\ripper\y.output +clean-local:: clean-prism + +clean-prism: + @for /R $(PRISM_BUILD_DIR:/=\) %I in (.time) do @(del /q %I && $(RMDIRS) %~pI) 2> nul || $(NULLCMD) + distclean-local:: $(Q)$(RM) ext\config.cache $(RBCONFIG:/=\) $(CONFIG_H:/=\) -$(Q)$(RM) $(INSTALLED_LIST:/=\) $(arch_hdrdir:/=\)\ruby\config.h verconf.h -$(Q)$(RMDIRS) $(arch_hdrdir:/=\)\ruby -$(Q)$(RMDIR) win32 +distclean-local:: distclean-prism + +distclean-prism: clean-prism +!if "$(srcdir)" != "." + $(Q)for %I in ( \ + $(PRISM_SRCDIR:/=\)\templates\ext\prism\*.c.erb \ + $(PRISM_SRCDIR:/=\)\templates\include\prism\*.h.erb \ + $(PRISM_SRCDIR:/=\)\templates\src\*.c.erb \ + ) do $(Q)(del /q prism\%~nI 2> nul || $(NULLCMD)) + $(Q)for /D %I in (prism\*) do $(Q)$(RMDIRS) %I + $(Q)$(RMDIRS) prism +!endif + +realclean-prism: distclean-prism +!if "$(srcdir)" == "." + $(Q)for %I in ( \ + $(PRISM_SRCDIR:/=\)\templates\ext\prism\*.c.erb \ + $(PRISM_SRCDIR:/=\)\templates\include\prism\*.h.erb \ + $(PRISM_SRCDIR:/=\)\templates\src\*.c.erb \ + ) do $(Q)(del /q $(PRISM_SRCDIR:/=\)\%~nI 2> nul || $(NULLCMD)) +!endif + .bundle/clean:: .bundle/clean.sub .bundle/distclean:: .bundle/distclean.sub .bundle/realclean:: .bundle/realclean.sub From fa513886410a85c2229acfa558c5375e5fad278b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 11 Jan 2025 01:14:23 +0900 Subject: [PATCH 07/17] Win32: Append `-p` option to `RMDIRS` `rmdirs.bat` may require this option explicitly to remove parent directories, in the future. --- win32/Makefile.sub | 4 ++-- win32/rmdirs.bat | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 79fbdb30c411e9..737c8f6bd6026b 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -117,7 +117,7 @@ IFCHANGE = $(COMSPEC) /C $(srcdir:/=\)\win32\ifchange.bat RM = $(COMSPEC) /C $(srcdir:/=\)\win32\rm.bat RM1 = del RMDIR = $(COMSPEC) /C $(srcdir:/=\)\win32\rmdirs.bat -RMDIRS = $(COMSPEC) /C $(srcdir:/=\)\win32\rmdirs.bat +RMDIRS = $(COMSPEC) /C $(srcdir:/=\)\win32\rmdirs.bat -p RMALL = $(COMSPEC) /C $(srcdir:/=\)\win32\rm.bat -f -r MAKEDIRS = $(COMSPEC) /E:ON /C $(srcdir:/=\)\win32\makedirs.bat TOUCH = $(BASERUBY) -run -e touch -- @@ -968,7 +968,7 @@ s,@LN_S@,$(LN_S),;t t s,@SET_MAKE@,MFLAGS = -$$(MAKEFLAGS),;t t s,@RM@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rm.bat,;t t s,@RMDIR@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rmdirs.bat,:t t -s,@RMDIRS@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rmdirs.bat,;t t +s,@RMDIRS@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rmdirs.bat -p,;t t s,@RMALL@,$$(COMSPEC) /C $$(top_srcdir:/=\)\win32\rm.bat -f -r,:t t s,@MAKEDIRS@,$$(COMSPEC) /E:ON /C $$(top_srcdir:/=\)\win32\makedirs.bat,;t t s,@LIBOBJS@,$(LIBOBJS),;t t diff --git a/win32/rmdirs.bat b/win32/rmdirs.bat index c3d7b637b3ea2a..a8abebd3839051 100755 --- a/win32/rmdirs.bat +++ b/win32/rmdirs.bat @@ -1,6 +1,9 @@ @echo off @setlocal EnableExtensions DisableDelayedExpansion || exit /b -1 -if "%1" == "-p" shift +set parents=1 +:optloop +if "%1" == "--debug" (shift & set PROMPT=$E[34m+$E[m$S & echo on & goto :optloop) +if "%1" == "-p" (shift & (set parents=1) & goto :optloop) :begin if "%1" == "" goto :end set dir=%1 @@ -12,6 +15,7 @@ if "%1" == "" goto :end if "%dir%" == "." goto :begin if "%dir%" == ".." goto :begin rd "%dir%" 2> nul || goto :begin + if "%parents%" == "" goto :begin :trim_sep if not /%dir:~-1%/ == /\/ goto :trim_base set dir=%dir:~0,-1% From ec80e92a4789533a2ae0be3aa3709c6d6ab229d2 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 11 Jan 2025 11:53:03 +0900 Subject: [PATCH 08/17] Win32: Refine outputs - Suppress logos from sub makes. - Set the prompt for `for` command when `echo` is on. --- win32/Makefile.sub | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 737c8f6bd6026b..68de9d5cf4178b 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -13,6 +13,10 @@ PWD = $(MAKEDIR) empty = tooldir = $(srcdir)/tool +PROMPT = +$$S + +MAKEFLAGS = l$(MAKEFLAGS) + !ifndef MFLAGS MFLAGS=-l !endif @@ -1210,7 +1214,7 @@ realclean-prism: distclean-prism .bundle/realclean.sub:: ext/realclean.mk ext/clean.mk ext/distclean.mk ext/realclean.mk:: - $(Q)if exist $(EXTS_MK) $(MAKE) -k -f $(EXTS_MK) top_srcdir=$(srcdir) $(*F) + $(Q)if exist $(EXTS_MK) $(MAKE) $(MFLAGS) -k -f $(EXTS_MK) top_srcdir=$(srcdir) $(*F) ext/clean.sub ext/distclean.sub ext/realclean.sub \ .bundle/clean.sub .bundle/distclean.sub .bundle/realclean.sub:: From c4fb79caa72d667512d1ca7647ac0443b22a3d47 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 11 Jan 2025 18:25:24 +0900 Subject: [PATCH 09/17] Win32: Clean generated sources --- win32/Makefile.sub | 3 +++ 1 file changed, 3 insertions(+) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 68de9d5cf4178b..f93f344b0d2d2d 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -1183,6 +1183,9 @@ distclean-local:: -$(Q)$(RMDIRS) $(arch_hdrdir:/=\)\ruby -$(Q)$(RMDIR) win32 +distclean-local:: clean-srcs-local +distclean-ext:: clean-srcs-ext + distclean-local:: distclean-prism distclean-prism: clean-prism From b2b674562db8e922fa6a6bd0469f20f4caf0954e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 11 Jan 2025 18:26:52 +0900 Subject: [PATCH 10/17] Win32: Support removing wildcards in middle of path --- win32/rm.bat | 71 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 56 insertions(+), 15 deletions(-) diff --git a/win32/rm.bat b/win32/rm.bat index 8263dadd28272e..c41ebfa5ee0177 100755 --- a/win32/rm.bat +++ b/win32/rm.bat @@ -1,23 +1,64 @@ @echo off @setlocal EnableExtensions DisableDelayedExpansion || exit /b -1 + +set prog=%~n0 +set dryrun= set recursive= +set debug= +set error=0 +set parent= + :optloop if "%1" == "-f" shift -if "%1" == "-r" (shift & set "recursive=1" & goto :optloop) -if "%1" == "--debug" (shift & set PROMPT=$E[34m+$E[m$S & echo on & goto :optloop) +if "%1" == "-n" (shift & set "dryrun=%1" & goto :optloop) +if "%1" == "-r" (shift & set "recursive=%1" & goto :optloop) +if "%1" == "--debug" (shift & set "debug=%1" & set PROMPT=$E[34m+$E[m$S & echo on & goto :optloop) :begin -if "%1" == "" goto :end -set p=%1 -shift -set p=%p:/=\% -if not exist "%p%" goto :begin +if "%1" == "" goto :EOF + set p=%1 + shift + set p=%p:/=\% + call :remove %p% +goto :begin -::- Try `rd` first for symlink to a directory; `del` attemps to remove all -::- files under the target directory, instead of the symlink itself. -(rd /q "%p%" || del /q "%p%") 2> nul && goto :begin +:remove +setlocal -if "%recursive%" == "1" for /D %%I in (%p%) do ( - rd /s /q %%I -) -goto :begin -:end +::- Split %1 by '?' and '*', wildcard characters +for /f "usebackq delims=?* tokens=1*" %%I in ('%1') do (set "par=%%I" & set "sub=%%J") +if "%sub%" == "" goto :remove_plain +if "%sub:\=%" == "%sub%" goto :remove_plain + ::- Extract the first wildcard + set "q=%1" + call set "q=%%q:%par%=%%" + set q=%q:~0,1% + + ::- `delims` chars at the beginning are removed in `for` + if "%sub:~0,1%" == "\" ( + set "sub=%sub:~1%" + set "par=%par%%q%" + ) else ( + for /f "usebackq delims=\\ tokens=1*" %%I in ('%sub%') do (set "par=%par%%q%%%I" & set "sub=%%J") + ) + + ::- Recursive search + for /d %%D in (%par%) do ( + call :remove %sub% %2%%D\ + ) +goto :remove_end +:remove_plain + set p=%2%1 + if not exist "%1" goto :remove_end + if not "%dryrun%" == "" ( + echo Removing %p:\=/% + goto :remove_end + ) + ::- Try `rd` first for symlink to a directory; `del` attemps to remove all + ::- files under the target directory, instead of the symlink itself. + (rd /q "%p%" || del /q "%p%") 2> nul && goto :remove_end + + if "%recursive%" == "-r" for /D %%I in (%p%) do ( + rd /s /q %%I || call set error=%%ERRORLEVEL%% + ) +:remove_end +endlocal & set "error=%error%" & goto :EOF From 0e222991bf11e28457819d42d751b517686c71e9 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 11 Jan 2025 18:28:53 +0900 Subject: [PATCH 11/17] Win32: Remove DLL files linked by `prepare-vcpkg` --- win32/Makefile.sub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index f93f344b0d2d2d..13e64d6e40ef27 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -1170,7 +1170,7 @@ clean-local:: $(Q)$(RM) $(WINMAINOBJ) ext\extinit.c ext\extinit.$(OBJEXT) ext\vc*.pdb miniruby.lib $(Q)$(RM) $(RUBY_INSTALL_NAME).res $(RUBYW_INSTALL_NAME).res $(RUBY_SO_NAME).res $(Q)$(RM) miniruby.rc $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc - $(Q)$(RM) *.map *.pdb *.ilk *.exp $(RUBYDEF) ext\ripper\y.output + $(Q)$(RM) *.map *.pdb *.ilk *.exp *.dll $(RUBYDEF) ext\ripper\y.output clean-local:: clean-prism From b17f6a2aae96bb0faf0d379dc54eda9878541f77 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 11 Jan 2025 23:11:08 +0900 Subject: [PATCH 12/17] Win32: Clean miniprelude --- win32/Makefile.sub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 13e64d6e40ef27..2904147b76f22f 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -1178,7 +1178,7 @@ clean-prism: @for /R $(PRISM_BUILD_DIR:/=\) %I in (.time) do @(del /q %I && $(RMDIRS) %~pI) 2> nul || $(NULLCMD) distclean-local:: - $(Q)$(RM) ext\config.cache $(RBCONFIG:/=\) $(CONFIG_H:/=\) + $(Q)$(RM) ext\config.cache $(RBCONFIG:/=\) $(CONFIG_H:/=\) miniprelude.c -$(Q)$(RM) $(INSTALLED_LIST:/=\) $(arch_hdrdir:/=\)\ruby\config.h verconf.h -$(Q)$(RMDIRS) $(arch_hdrdir:/=\)\ruby -$(Q)$(RMDIR) win32 From a9961701582d842bb5866d57d8e22cf4aa46eba8 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 12 Jan 2025 17:24:06 +0900 Subject: [PATCH 13/17] Win32: Remove bundled gems directories --- win32/Makefile.sub | 3 +++ 1 file changed, 3 insertions(+) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 2904147b76f22f..da666951b2580c 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -1236,6 +1236,9 @@ ext/clean.sub ext/distclean.sub ext/realclean.sub \ ext/distclean ext/realclean .bundle/distclean .bundle/realclean:: $(Q)cd $(@D) 2>nul && (for /R $(EXTS) %I in (exts.mk*) \ do $(Q)(del %I & rmdir %~dpI)) || $(NULLCMD) + +.bundle/distclean .bundle/realclean:: + $(Q)for /D %I in ($(@D)\*) do $(Q)$(RMDIRS) %I || $(NULLCMD) -$(Q)rmdir $(@D) 2> nul || $(NULLCMD) .bundle/realclean:: From 0be626e7551f9e9ed201b9c4a66aab5fcf3e6fbb Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 29 Nov 2025 17:13:21 +0900 Subject: [PATCH 14/17] Win32: Clean timestamp directory for platform --- common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.mk b/common.mk index eb9b75ca7e3dd0..35c23159800160 100644 --- a/common.mk +++ b/common.mk @@ -801,7 +801,7 @@ clean-capi distclean-capi realclean-capi: clean-platform distclean-platform realclean-platform: $(Q) $(RM) $(PLATFORM_D) - -$(Q) $(RMDIR) $(PLATFORM_DIR) 2> $(NULL) || $(NULLCMD) + -$(Q) $(RMDIR) $(PLATFORM_DIR) $(TIMESTAMPDIR) 2> $(NULL) || $(NULLCMD) RUBYSPEC_CAPIEXT = spec/ruby/optional/capi/ext RUBYSPEC_CAPIEXT_SRCDIR = $(srcdir)/$(RUBYSPEC_CAPIEXT) From b563be302f635116e30e3d80812962650f5564ef Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 29 Nov 2025 17:13:56 +0900 Subject: [PATCH 15/17] Win32: Clean empty directories --- win32/Makefile.sub | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/win32/Makefile.sub b/win32/Makefile.sub index da666951b2580c..c3db450abc30a0 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -1234,8 +1234,7 @@ ext/clean.sub ext/distclean.sub ext/realclean.sub \ ))) || $(NULLCMD) ext/distclean ext/realclean .bundle/distclean .bundle/realclean:: - $(Q)cd $(@D) 2>nul && (for /R $(EXTS) %I in (exts.mk*) \ - do $(Q)(del %I & rmdir %~dpI)) || $(NULLCMD) + $(Q)(for /D /R $(@D) %I in (.) do $(Q)$(RMDIRS) %I) || $(NULLCMD) .bundle/distclean .bundle/realclean:: $(Q)for /D %I in ($(@D)\*) do $(Q)$(RMDIRS) %I || $(NULLCMD) From e2d176556e36ae7911af3ff6163420a48b82af92 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 2 Dec 2025 08:12:45 +0900 Subject: [PATCH 16/17] CI: Distclean mswin Use the given `make-command` instead of the hard-coded `make` command. TODO: Use it for `make up` as well, in the future. --- .github/actions/setup/directories/action.yml | 9 ++++++++- .github/workflows/windows.yml | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup/directories/action.yml b/.github/actions/setup/directories/action.yml index b64227e4359c71..8389ef54b78e5e 100644 --- a/.github/actions/setup/directories/action.yml +++ b/.github/actions/setup/directories/action.yml @@ -19,6 +19,13 @@ inputs: Where binaries and other generated contents go. This will be created if absent. + make-command: + required: false + type: string + default: 'make' + description: >- + The command of `make`. + makeup: required: false type: boolean @@ -169,7 +176,7 @@ runs: shell: bash id: clean run: | - echo distclean='make -C ${{ inputs.builddir }} distclean' >> $GITHUB_OUTPUT + echo distclean='cd ${{ inputs.builddir }} && ${{ inputs.make-command }} distclean' >> $GITHUB_OUTPUT echo remained-files='find ${{ inputs.builddir }} -ls' >> $GITHUB_OUTPUT [ "${{ inputs.builddir }}" = "${{ inputs.srcdir }}" ] || echo final='rmdir ${{ inputs.builddir }}' >> $GITHUB_OUTPUT diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 4659fb80f8434d..dd4bf0de968108 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -75,6 +75,8 @@ jobs: with: srcdir: src builddir: build + make-command: nmake + clean: true - name: Install tools with scoop run: | From 7df97983be41e893afee6d0012c6dced55ff98f8 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 2 Dec 2025 11:39:29 +0900 Subject: [PATCH 17/17] [ruby/rubygems] Improve banner message for the default command. Co-authored-by: Benoit Daloze https://github.com/ruby/rubygems/commit/463488b439 Co-authored-by: Patrik Ragnarsson --- lib/bundler/cli.rb | 6 +++--- spec/bundler/bundler/cli_spec.rb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index f5977863ddcc26..9c29751a7c31fb 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -133,10 +133,10 @@ def self.default_command(meth = nil) unless Bundler.settings[:default_cli_command] Bundler.ui.info <<-MSG - In the feature version of Bundler, running `bundle` without argument will no longer run `bundle install`. + In a future version of Bundler, running `bundle` without argument will no longer run `bundle install`. Instead, the `cli_help` command will be displayed. Please use `bundle install` explicitly for scripts like CI/CD. - If you wish to use feature behavior now with `bundle config set default_cli_command cli_help --global` - or you can continue to use the old behavior with `bundle config set default_cli_command install_or_cli_help --global`. + You can use the future behavior now with `bundle config set default_cli_command cli_help --global`, + or you can continue to use the current behavior with `bundle config set default_cli_command install_or_cli_help --global`. This message will be removed after a default_cli_command value is set. MSG end diff --git a/spec/bundler/bundler/cli_spec.rb b/spec/bundler/bundler/cli_spec.rb index ac6b77ad7483bf..4503cea6a0058c 100644 --- a/spec/bundler/bundler/cli_spec.rb +++ b/spec/bundler/bundler/cli_spec.rb @@ -90,7 +90,7 @@ def out_with_macos_man_workaround it "tries to installs by default but print help on missing Gemfile" do bundle "", raise_on_error: false expect(err).to include("Could not locate Gemfile") - expect(out).to include("In the feature version of Bundler") + expect(out).to include("In a future version of Bundler") expect(out).to include("Bundler version #{Bundler::VERSION}"). and include("\n\nBundler commands:\n\n"). @@ -102,7 +102,7 @@ def out_with_macos_man_workaround it "runs bundle install when default_cli_command set to install" do bundle "config set default_cli_command install_or_cli_help" bundle "", raise_on_error: false - expect(out).to_not include("In the feature version of Bundler") + expect(out).to_not include("In a future version of Bundler") expect(err).to include("Could not locate Gemfile") end end