Having a problem for two days.

Ever since I update the MinGW I getting errors. I even deleted it and start over from scratch. Still the same error. buildtools.bat doesn't even fix the issue.

It run make ok but it stop here at.

Archiving liboptional.a...
makefile:777: recipe for target 'windows_x64' failed
make: *** [windows_x64] Error 2
Press any key to continue . . .

I open the Make.bat file and then added make clean. Clean also have the error too.

process_begin: CreateProcess(NULL, rm -rf build, ...) failed.
make (e=2): The system cannot find the file specified.
makefile:1089: recipe for target 'clean' failed
make: [clean] Error 2 (ignored)

Is there anything I need to change in my Make.bat file?

@echo off
set MINGW64=E:\MAME\dev\buildtools\vendor\mingw64
set path=E:\MAME\dev\buildtools\vendor\mingw64\bin;E:\MAME\dev\buildtools\vendor\mingw64\x86_64-w64-mingw32\bin;E:\MAME\dev\buildtools\vendor\mingw64\opt\bin;E:\MAME\dev\buildtools\vendor\qt\mingw64\Qt\bin;
cd E:\MAME\dev\source

Works before I updated and re-downloaded the buildtools.

Windows 10 Home 64-bit / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 16 GB