bug-make
[Top][All Lists]
Advanced

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

Re: [bug #41246] Allow to switch shell batch mode at runtime instead of


From: Mike Hommey
Subject: Re: [bug #41246] Allow to switch shell batch mode at runtime instead of build time
Date: Wed, 5 Feb 2014 16:30:25 +0900
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Feb 04, 2014 at 12:28:53PM -0500, Paul Smith wrote:
> On Tue, 2014-02-04 at 18:54 +0200, Eli Zaretskii wrote:
> > > Another issue is with backslashes in paths.
> > > 
> > > For example:
> > > $ cat <<EOF > foo.mk
> > > foo:
> > >         grep foo < foo\\bar
> > > EOF
> > > 
> > > (Note the < is just there to trigger sh -c)
> > > 
> > > This executes sh -c "grep foo < foo\\bar", which fails with:
> > >   /usr/bin/sh: foobar: No such file or directory
> > > But in batch mode shell, this executes sh makennnnn.sh with a
> > content of
> > >   grep foo < foo\\bar
> > > and that fails with:
> > >   makennnnn.sh: line 1: foo\bar: No such file or directory
> > > 
> > > (Note how in one case the backslash is eaten and not in the other
> > case)
> > 
> > Why are you using backslashes in file names when your shell is a Unixy
> > shell?  That makes little sense to me, and I don't see why Make on
> > Windows should support such use.  Unixy shells are supposed to get
> > Unixy file names with forward slashes, including in redirection.
> 
> I agree about using backslashes as directory separators, that obviously
> cannot work in /bin/sh, even on Windows.

Actually, with msys sh, it works. It just didn't work in my case because
i didn't have a foo directory with a bar file in it. If i do create
them, those commands work as expected (except the rule doesn't run
because foo exists, so i need to rename it or make it phony)

Mike



reply via email to

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