bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Bad sed expression in bootstrap.bat


From: Giangiacomo Zaffini
Subject: [PATCH] Bad sed expression in bootstrap.bat
Date: Thu, 22 Dec 2022 18:17:49 +0100

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

Attachment: win11_bootstrap_bat_changes.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]