Re: [PATCH] Bad sed expression in bootstrap.bat

2022-12-26 Thread Paul Smith
On Mon, 2022-12-26 at 16:30 +0200, Eli Zaretskii wrote:
> Well, if that is a problem, you could have bootstrap.bat write that
> file for you.

I thought of that but how can I write a file containing backslashes?

> If you do this with "echo", you don't need to worry about backslash
> munging, I think, since cmd.exe's "echo" is very simple-minded, and
> just blindly copies every character, including the quotes.

Oh... OK I will give this a try :).



Re: [PATCH] Bad sed expression in bootstrap.bat

2022-12-26 Thread Eli Zaretskii
> From: Paul Smith 
> Cc: gzaf...@gmail.com, bug-make@gnu.org
> Date: Mon, 26 Dec 2022 09:15:56 -0500
> 
> On Mon, 2022-12-26 at 05:29 +0200, Eli Zaretskii wrote:
> > How about reading the Sed script from a file, with the -f command-
> > line argument?
> 
> That would work.  It's annoying to have to add an entirely new file in
> source control just to work around this though.

Well, if that is a problem, you could have bootstrap.bat write that
file for you.  If you do this with "echo", you don't need to worry
about backslash munging, I think, since cmd.exe's "echo" is very
simple-minded, and just blindly copies every character, including the
quotes.



Re: [PATCH] Bad sed expression in bootstrap.bat

2022-12-26 Thread Paul Smith
On Mon, 2022-12-26 at 05:29 +0200, Eli Zaretskii wrote:
> How about reading the Sed script from a file, with the -f command-
> line argument?

That would work.  It's annoying to have to add an entirely new file in
source control just to work around this though.

> > bootstrap.bat is the counterpart to the bootstrap shell script, for
> > when you are running on Windows.  It allows someone to check out
> > the Git repository and build it natively on Windows without needing
> > all the autotools, etc.  It needs no POSIX tools other than a
> > version of sed.
> 
> So it should basically only work for you and no one else?

No; actually it's ONLY for other people: I don't use it myself.  When I
do testing on Windows I always build a dist file on my GNU/Linux system
and send it over to Windows and unpack and test it there.

That script is for other people who want to build GNU make checked out
directly from Git on their Windows system and don't want to have to
install, or have access to, a fully decked-out POSIX environment where
they can run all the auto tools like autoconf, automake, gettext, etc.
that are normally needed to build from Git.