[cairo] [PATCH] Fix Windows build with cmd.exe as shell
Bryce Harrington
bryce at osg.samsung.com
Thu Apr 23 14:42:19 PDT 2015
On Thu, Apr 23, 2015 at 09:33:00PM +0200, Simon Richter wrote:
> On 23.04.2015 02:11, Bryce Harrington wrote:
>
> >> cmd.exe has unsubtly different behaviour from POSIX sh in a lot of places.
> >> This determines whether the current default shell for make is cmd.exe, and
> >> avoids "mkdir -p", "rm" and quotes around the argument to echo in this
> >> case.
>
> > What exactly is the breakage that this fixes? IOW, why has the current
> > code worked up 'til now on windows?
>
> It works if you have a POSIX compatible shell in your path, e.g. if you
> are using msys or cygwin.
>
> I'm trying to minimize dependencies to make it easier to build on a
> freshly installed Windows system, so I can easily set up autobuilders.
>
> http://ci.kicad-pcb.org/job/pixman-win32/lastSuccessfulBuild/console is
> the log from the last build, using this patch. The system only has Java
> (for Jenkins) and git (to check out cairo) installed, and builds a
> standalone GNU make.
>
> >> +mkdir_p = if not exist $(subst /,\,$1) md $(subst /,\,$1)
> >> +echo = $(if $1,echo $1,echo.)
> >> +rm = del $(subst /,\,$1)
>
> > If you use := instead of = for these command definitions, would it
> > eliminate the need for the calls in the rest of the patch?
>
> No, the call is needed because I need to process the arguments (md and
> del do not handle forward slashes and echo needs a dot to print a
> newline instead of "@ECHO is off".
Well, in any case, the hacky looking echo statements that the call
syntax creates makes the patch kind of a non-starter for me. The goal
sounds noble enough though, so I'd consider another patch that was less
invasive.
> > Also, the makefile style seems to be to use uppercase letters when
> > using variables rather than system commands, so you should be specifying
> > MKDIR_P, ECHO, and RM.
>
> Yes, however these are not commands per se, but rather "functions"
> within make.
>
> Simon
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
>
> iQEcBAEBAgAGBQJVOUjtAAoJEH69OHuwmQgRSvoH/1onwHhT4ag8naYTyBoxHJwr
> mDpmC+Q4bW6hoJsVubg/jyf6/sLtTwvNnYVP8OvNn0Z5x4n3OntPCHEdwRgCEIIW
> 7LVGDEl6kpwwa1cxOshZVkiPp59grPBFtdHDdRT1b7xLOErViphv4MLd9qBzMqEn
> U2sD8Pkpmiu1yYjcdaqQa3Ntc8x2XwpK+bYHFdMg98lIxJrVAqxKLOe4bdCIjfBa
> VL2S5i3Di3nIMDRwovAfChyUEs4dcRWzTQx2FUIgdO+BtX54IdzMIjZj41GE4S6h
> u0oePzqul/mwBpjp0UYt451vR3GizhA4ZIv7NHgIEwpeZPc9AZB5g6sawumrmxU=
> =e+Ir
> -----END PGP SIGNATURE-----
More information about the cairo
mailing list