[Mono-list] mono/mono/metatdata/Makefile.am fix for cygwin
Urs Muff
umuff@quark.com
Fri, 11 Apr 2003 11:01:25 -0600
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C3004B.FCB4A430
Content-Type: text/plain
$ cvs diff -u
cvs server: Diffing .
Index: Makefile.am
===================================================================
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 1.70
+++ Makefile.am 11 Apr 2003 16:55:37 -0000
@@ -1,7 +1,7 @@
if PLATFORM_WIN32
export HOST_CC
-assembliesdir = `cygpath -w "${libdir}"`
-confdir = `cygpath -w "${sysconfdir}"`
+assembliesdir = `cygpath -w "${libdir}" | sed -e 's@\\\\@\\\\\\\\@g'`
+confdir = `cygpath -w "${sysconfdir}" | sed -e 's@\\\\@\\\\\\\\@g'`
# The mingw math.h has "extern inline" functions that dont appear in libs,
so
# optimisation is required to actually inline them
AM_CFLAGS = -O
With this fix I could compile mono on cygwin, otherwise I got warnings that
the MONO_ASSEMBLIES using in assembly.c had invalid escape sequences, since
cygpath -w is turning the path into a windows path like
-DMONO_ASSEMBLIES="C:\\mono\\install". This gets turned into
"C:\mono\install" by the shell, and then the string has invalid escape
sequences. Replacing \\ with \\\\ will turn "C:\\mono\\install" into
"C:\\\\mono\\\\install" which the shell will turn into "C:\\mono\\install",
and the gcc will be happy.
- Urs C. Muff
Systems Architect - Research Lab
------_=_NextPart_001_01C3004B.FCB4A430
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>mono/mono/metatdata/Makefile.am fix for cygwin</TITLE>
</HEAD>
<BODY>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">$ cvs diff -u</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">cvs server: Diffing =
.</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">Index: =
Makefile.am</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 =
FACE=3D"Arial">=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=
</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">RCS file: =
/mono/mono/mono/metadata/Makefile.am,v</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">retrieving revision =
1.70</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">diff -u -r1.70 =
Makefile.am</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">--- Makefile.am 3 Apr =
2003 16:23:46 -0000 1.70</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">+++ Makefile.am 11 Apr =
2003 16:55:37 -0000</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">@@ -1,7 +1,7 =
@@</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial"> if =
PLATFORM_WIN32</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial"> export =
HOST_CC</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">-assembliesdir =3D =
`cygpath -w "${libdir}"`</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">-confdir =3D `cygpath -w =
"${sysconfdir}"`</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">+assembliesdir =3D =
`cygpath -w "${libdir}" | sed -e =
's@\\\\@\\\\\\\\@g'`</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">+confdir =3D `cygpath -w =
"${sysconfdir}" | sed -e 's@\\\\@\\\\\\\\@g'`</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial"> # The mingw math.h =
has "extern inline" functions that dont appear in libs, =
so</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial"> # optimisation is =
required to actually inline them</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial"> AM_CFLAGS =3D =
-O</FONT></P>
<P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">With this fix I could =
compile mono on cygwin, otherwise I got warnings that the =
MONO_ASSEMBLIES</FONT> <FONT SIZE=3D2 FACE=3D"Arial">using in</FONT> =
<FONT SIZE=3D2 FACE=3D"Arial">assembly.c</FONT><FONT SIZE=3D2 =
FACE=3D"Arial"> had invalid escape sequences,</FONT> <FONT SIZE=3D2 =
FACE=3D"Arial">since cygpath</FONT> <FONT SIZE=3D2 =
FACE=3D"Arial">-</FONT><FONT SIZE=3D2 FACE=3D"Arial">w is turning the =
path into a windows path like</FONT> <FONT SIZE=3D2 =
FACE=3D"Arial">-</FONT><FONT SIZE=3D2 FACE=3D"Arial">DMONO_</FONT><FONT =
SIZE=3D2 FACE=3D"Arial">ASSEMBLIES=3D</FONT><FONT SIZE=3D2 =
FACE=3D"Arial">"</FONT><FONT SIZE=3D2 =
FACE=3D"Arial">C:\\mono\\install</FONT><FONT SIZE=3D2 =
FACE=3D"Arial">"</FONT><FONT SIZE=3D2 FACE=3D"Arial">. This gets =
turned into</FONT> <FONT SIZE=3D2 FACE=3D"Arial">"</FONT><FONT SIZE=3D2 =
FACE=3D"Arial">C:\mono\install</FONT><FONT SIZE=3D2 =
FACE=3D"Arial">"</FONT><FONT SIZE=3D2 FACE=3D"Arial"> by the shell, and =
then the string has invalid escape sequences.</FONT><FONT SIZE=3D2 =
FACE=3D"Arial"> Replacing \\ with \\\\ will turn</FONT> <FONT =
SIZE=3D2 FACE=3D"Arial">"</FONT><FONT SIZE=3D2 =
FACE=3D"Arial">C:\\mono\\install</FONT><FONT SIZE=3D2 =
FACE=3D"Arial">"</FONT><FONT SIZE=3D2 FACE=3D"Arial"> into</FONT> <FONT =
SIZE=3D2 FACE=3D"Arial">"</FONT><FONT SIZE=3D2 =
FACE=3D"Arial">C:\\</FONT><FONT SIZE=3D2 FACE=3D"Arial">\\</FONT><FONT =
SIZE=3D2 FACE=3D"Arial">mono</FONT><FONT SIZE=3D2 =
FACE=3D"Arial">\\</FONT><FONT SIZE=3D2 =
FACE=3D"Arial">\\install</FONT><FONT SIZE=3D2 =
FACE=3D"Arial">"</FONT><FONT SIZE=3D2 FACE=3D"Arial"> which the shell =
will turn into</FONT> <FONT SIZE=3D2 FACE=3D"Arial">"</FONT><FONT =
SIZE=3D2 FACE=3D"Arial">C:\\mono\\install</FONT><FONT SIZE=3D2 =
FACE=3D"Arial">"</FONT><FONT SIZE=3D2 FACE=3D"Arial">, and the gcc will =
be happy.</FONT></P>
<P ALIGN=3DLEFT><B></B><A NAME=3D"_MailAutoSig"><B><FONT =
COLOR=3D"#003300" SIZE=3D2 FACE=3D"Garamond">- Urs C. =
Muff</FONT></B></A></P>
<P ALIGN=3DLEFT><FONT COLOR=3D"#003300" SIZE=3D2 =
FACE=3D"Garamond">Systems Architect </FONT><B></B><B> =
<FONT COLOR=3D"#003300" SIZE=3D2 FACE=3D"Garamond">- =
Research Lab</FONT></B></P>
<P ALIGN=3DLEFT></P>
</BODY>
</HTML>
------_=_NextPart_001_01C3004B.FCB4A430--