[Mono-list] mono/mono/metatdata/Makefile.am fix for cygwin

John Duncan jddst19@mac.com
Sat, 12 Apr 2003 09:26:46 -0400


--Apple-Mail-2-979846001
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=ISO-8859-1;
	format=flowed

It's perfectly valid to use forward slashes.  Why not try it like that?
On Friday, April 11, 2003, at 01:01 PM, Urs Muff wrote:

> $ cvs diff -u
>
> cvs server: Diffing .
>
> Index: Makefile.am
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
> RCS file: /mono/mono/mono/metadata/Makefile.am,v
>
> retrieving revision 1.70
>
> diff -u -r1.70 Makefile.am
>
> --- Makefile.am 3 Apr 2003 16:23:46 -0000=A0=A0=A0=A0=A0=A0 1.70
>
> +++ Makefile.am 11 Apr 2003 16:55:37 -0000
>
> @@ -1,7 +1,7 @@
>
> =A0if PLATFORM_WIN32
>
> =A0export HOST_CC
>
> -assembliesdir =3D `cygpath -w "${libdir}"`
>
> -confdir =3D `cygpath -w "${sysconfdir}"`
>
> +assembliesdir =3D `cygpath -w "${libdir}" | sed -e =
's@\\\\@\\\\\\\\@g'`
>
> +confdir =3D `cygpath -w "${sysconfdir}" | sed -e 's@\\\\@\\\\\\\\@g'`
>
> =A0# The mingw math.h has "extern inline" functions that dont appear =
in=20
> libs, so
>
> =A0# optimisation is required to actually inline them
>
> =A0AM_CFLAGS =3D -O
>
> With this fix I could compile mono on cygwin, otherwise I got warnings=20=

> that the MONO_ASSEMBLIES using in assembly.c had invalid escape=20
> sequences, since cygpath -w is turning the path into a windows path=20
> like -DMONO_ASSEMBLIES=3D"C:\\mono\\install".=A0 This gets turned into=20=

> "C:\mono\install" by the shell, and then the string has invalid escape=20=

> sequences.=A0 Replacing \\ with \\\\ will turn "C:\\mono\\install" =
into=20
> "C:\\\\mono\\\\install" which the shell will turn into=20
> "C:\\mono\\install", and the gcc will be happy.
>
  - Urs C. Muff- Urs C. Muff
>
> Systems Architect=A0=A0 =A0=A0=A0 - Research Lab
>
>
>

--Apple-Mail-2-979846001
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
	charset=ISO-8859-1

It's perfectly valid to use forward slashes.  Why not try it like that?

On Friday, April 11, 2003, at 01:01 PM, Urs Muff wrote:


<excerpt><fontfamily><param>Arial</param><smaller>$ cvs diff =
-u</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>cvs server: Diffing =
.</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>Index: =
Makefile.am</smaller></fontfamily>


=
<fontfamily><param>Arial</param><smaller>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>RCS file:
/mono/mono/mono/metadata/Makefile.am,v</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>retrieving revision =
1.70</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>diff -u -r1.70 =
Makefile.am</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>--- Makefile.am 3 Apr 2003
16:23:46 -0000=A0=A0=A0=A0=A0=A0 1.70</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>+++ Makefile.am 11 Apr 2003
16:55:37 -0000</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>@@ -1,7 +1,7 =
@@</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>=A0if =
PLATFORM_WIN32</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>=A0export =
HOST_CC</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>-assembliesdir =3D `cygpath -w
"${libdir}"`</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>-confdir =3D `cygpath -w
"${sysconfdir}"`</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>+assembliesdir =3D `cygpath -w
"${libdir}" | sed -e 's@\\\\@\\\\\\\\@g'`</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>+confdir =3D `cygpath -w
"${sysconfdir}" | sed -e 's@\\\\@\\\\\\\\@g'`</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>=A0# The mingw math.h has
"extern inline" functions that dont appear in libs, =
so</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>=A0# optimisation is required
to actually inline them</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>=A0AM_CFLAGS =3D =
-O</smaller></fontfamily>


<fontfamily><param>Arial</param><smaller>With this fix I could compile
mono on cygwin, otherwise I got warnings that the
MONO_ASSEMBLIES</smaller></fontfamily> =
<fontfamily><param>Arial</param><smaller>using
in</smaller></fontfamily>
<fontfamily><param>Arial</param><smaller>assembly.c had invalid escape
sequences,</smaller></fontfamily>
<fontfamily><param>Arial</param><smaller>since
cygpath</smaller></fontfamily> =
<fontfamily><param>Arial</param><smaller>-w
is turning the path into a windows path like</smaller></fontfamily>
=
<fontfamily><param>Arial</param><smaller>-DMONO_ASSEMBLIES=3D"C:\\mono\\in=
stall".=A0
This gets turned into</smaller></fontfamily>
<fontfamily><param>Arial</param><smaller>"C:\mono\install" by the
shell, and then the string has invalid escape sequences.=A0 Replacing \\
with \\\\ will turn</smaller></fontfamily>
<fontfamily><param>Arial</param><smaller>"C:\\mono\\install"
into</smaller></fontfamily> =
<fontfamily><param>Arial</param><smaller>"C:\\\\mono\\\\install"
which the shell will turn into</smaller></fontfamily>
<fontfamily><param>Arial</param><smaller>"C:\\mono\\install", and the
gcc will be happy.</smaller></fontfamily>


</excerpt> <bold><color><param>0000,3333,0000</param><smaller>- Urs C.
Muff- Urs C. Muff</smaller></color></bold>

<excerpt>

<color><param>0000,3333,0000</param><smaller>Systems
Architect=A0=A0</smaller></color><bold> =A0=A0=A0
<color><param>0000,3333,0000</param><smaller>- Research =
Lab</smaller></color></bold>




</excerpt>=

--Apple-Mail-2-979846001--