Re: [PATCH] Fix Windows build with cmd.exe as shell

Simon Richter <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
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".

> 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

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
signature.asc (application/pgp-signature, 473 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJVOUjtAAoJEH69OHuwmQgRSvoH/1onwHhT4ag8naYTyBoxHJwr
mDpmC+Q4bW6hoJsVubg/jyf6/sLtTwvNnYVP8OvNn0Z5x4n3OntPCHEdwRgCEIIW
7LVGDEl6kpwwa1cxOshZVkiPp59grPBFtdHDdRT1b7xLOErViphv4MLd9qBzMqEn
U2sD8Pkpmiu1yYjcdaqQa3Ntc8x2XwpK+bYHFdMg98lIxJrVAqxKLOe4bdCIjfBa
VL2S5i3Di3nIMDRwovAfChyUEs4dcRWzTQx2FUIgdO+BtX54IdzMIjZj41GE4S6h
u0oePzqul/mwBpjp0UYt451vR3GizhA4ZIv7NHgIEwpeZPc9AZB5g6sawumrmxU=
=e+Ir
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.