Lately I read that make can be built on source with TCC Tiny C Compiler on Windows. So as an exercise I tried to do so.
While bootstrapping on Windows 11 machine I noticed bootstrap/bat complaining about a sed expression ``` ********************************************************************** ** Visual Studio 2022 Developer Command Prompt v17.4.3 ** Copyright (c) 2022 Microsoft Corporation ********************************************************************** [vcvarsall.bat] Environment initialized for: 'x64' C:\Program Files\Microsoft Visual Studio\2022\Community>cd C:\Users\gzaff\Devs\make C:\Users\gzaff\Devs\make>bootstrap.bat -- Downloading Gnulib modules -- Configuring the workspace - Creating Basic.mk - Creating src\mkconfig.h - Creating src\gmk-default.h C:\Users\gzaff\scoop\apps\sed\current\sed.exe: -e expression #4, char 9: unterminated `s' command *** Bootstrap failed. Resolve the issue, or use the configured source in the release tarball C:\Users\gzaff\Devs\make> ``` It can be fixed as this patch shows ``` diff --git a/bootstrap.bat b/bootstrap.bat index c1f6819a..71ca9721 100644 --- a/bootstrap.bat +++ b/bootstrap.bat @@ -70,7 +70,7 @@ if ERRORLEVEL 1 goto Failed echo - Creating src\gmk-default.h echo static const char *const GUILE_module_defn = ^" \ > src\gmk-default.h -sed -e "s/;.*//" -e "/^[ \t]*$/d" -e "s/\"/\\\\\"/g" -e "s/$/ \\\/" src\gmk-default.scm >> src\gmk-default.h +sed -e "s/;.*//" -e "/^[ \t]*$/d" -e "s/\"/\\\\\"/g" -e "s/$/ \\/" src\gmk-default.scm >> src\gmk-default.h if ERRORLEVEL 1 goto Failed echo ^";>> src\gmk-default.h ``` I could build make without problem with MSVC (later on I will test TCC) with ``` C:\Users\gzaff\Devs\make>build_w32.bat --without-guile ``` Regards, Giangiacomo Zaffini -- il riposo dopo il lavoro
win11_bootstrap_bat_changes.patch
Description: Binary data