[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[h-e-w] Fwd: Fw: compiling emacs using msys (correction)
From: |
Geoff Voelker |
Subject: |
[h-e-w] Fwd: Fw: compiling emacs using msys (correction) |
Date: |
Sun, 15 Jan 2006 10:27:41 -0800 |
Stephen, thanks for the report and the patch.
Can someone still maintaining the port take a look and apply it if
necessary?
Thanks,
-geoff
------- start of forwarded message (RFC 934 encapsulation) -------
From: "Stephen" <address@hidden>
To: "Geoff Voelker" <address@hidden>
Cc: <address@hidden>
Subject: Fw: compiling emacs using msys (correction)
Date: Tue, 3 Jan 2006 17:48:34 -0600
How embarassing, all I had to do to install it was to follow your directions
in INSTALL.
6) To install, type: make install INSTALL_DIR=C:\emacs
The link still does not work because of /q being interpreted as a directory
and
the patch is still needed..
Stephen
- ----- Original Message -----
From: "Stephen" <address@hidden>
To: "Geoff Voelker" <address@hidden>
Cc: <address@hidden>
Sent: Tuesday, January 03, 2006 4:33 PM
Subject: compiling emacs using msys
>I am sending this both to Geoff and Peter to make sure someone gets this
>who
> is currnetly working on emacs for windows.
>
> I think you might want to hear about this.
>
> I seem to have been able to use your scripts to compile emacs on Windows
> XP
> using MSYS.
>
> Running MSYS is like running CYGWIN with the -mno-cygwin flag. However,
> the
> bash shell MSYS provides is isolated from cmd.exe on XP. One cannot run a
> .bat
> file from it and if one runs configure.bat in the cmd shell, it returns an
> error that cp.exe
> cannot be found, even though one can still run gnu make from the bash
> shell
> after
> configure.bat is run. MSYS provides the Gnu version of make along with
> Mingw.
> Mingw renamed its make to mingw32-make because a Gnu make is better.
> Anyway,
> I cannot run configure.bat in the bash shell and I cannot run cp.exe in
> the
> cmd shell; the cmd shell uses copy instead of cp of course. So I took
> advantage of the fact that one
> can run shell inside of a shell. This is how I compiled emacs using your
> scripts:
>
> 1) Start msys.
> 2) run cmd
> 3) type: configure --with-gcc
> I assume I must use the flag, since mingw might not be visible from the
> command shell.
> I guess I must be wrong though, otherwise how would cp.exe be visible?
> 4) Nevertheless, I exited from the cmd shell and return to the bash shell
> after running
> configure by typing: exit.
> 5) Then I typed 'make', not gmake, make is the gnu make and there is no
> gmake.
>
> Everything worked fine except -mcpu is deprecated and should now be
> -mtune=i686 instead. I used emacs-21.4, but in the latest cvs the
> correction
> would be in configure.bat. Instead of 'set mf=-cpu=i686' use 'set
> mf=-mtune-i686'.
>
> The only problem was that 'make install' installed into the emacs-21.4
> directory.
> I had to move the needed files into c:\emacs by hand, editing the strange
> 'C:\msys\1.0/q\bin\runemacs.exe' link to 'C:\emacs\bin\runemacs.exe'.
> /q was a switch in the makefile, but was misinterpreted as a directory.
>
> I hope you can use this information to help people compile emacs using
> msys.
>
> Well, also, here is a patch for callproc.c. Just rename callproc.c
> callproc_old.c and apply the patch.
>
> The patch is to undo an implicit declaration of 'egetenv' error. Mingw
> won't
> let a function be used ahead of its definition.
>
> Stephen
>
- ------=_NextPart_000_0011_01C6108D.EAD8AEA0
Content-Type: application/octet-stream;
name="callproc.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="callproc.patch"
- --- callproc_old.c Tue Jan 3 15:46:32 2006=0A=
+++ callproc.c Tue Jan 3 15:48:44 2006=0A=
@@ -141,4 +141,71 @@=0A=
#ifndef VMS /* VMS version is in vmsproc.c. */=0A=
=0A=
+static int=0A=
+getenv_internal (var, varlen, value, valuelen)=0A=
+ char *var;=0A=
+ int varlen;=0A=
+ char **value;=0A=
+ int *valuelen;=0A=
+{=0A=
+ Lisp_Object scan;=0A=
+=0A=
+ for (scan =3D Vprocess_environment; CONSP (scan); scan =3D XCDR =
(scan))=0A=
+ {=0A=
+ Lisp_Object entry;=0A=
+=0A=
+ entry =3D XCAR (scan);=0A=
+ if (STRINGP (entry)=0A=
+ && SBYTES (entry) > varlen=0A=
+ && SREF (entry, varlen) =3D=3D '=3D'=0A=
+#ifdef WINDOWSNT=0A=
+ /* NT environment variables are case insensitive. */=0A=
+ && ! strnicmp (SDATA (entry), var, varlen)=0A=
+#else /* not WINDOWSNT */=0A=
+ && ! bcmp (SDATA (entry), var, varlen)=0A=
+#endif /* not WINDOWSNT */=0A=
+ )=0A=
+ {=0A=
+ *value =3D (char *) SDATA (entry) + (varlen + 1);=0A=
+ *valuelen =3D SBYTES (entry) - (varlen + 1);=0A=
+ return 1;=0A=
+ }=0A=
+ }=0A=
+=0A=
+ return 0;=0A=
+}=0A=
+=0A=
+DEFUN ("getenv-internal", Fgetenv_internal, Sgetenv_internal, 1, 1, 0,=0A=
+ doc: /* Return the value of environment variable VAR, as a =
string.=0A=
+VAR should be a string. Value is nil if VAR is undefined in the =
environment.=0A=
+This function consults the variable ``process-environment'' for its =
value. */)=0A=
+ (var)=0A=
+ Lisp_Object var;=0A=
+{=0A=
+ char *value;=0A=
+ int valuelen;=0A=
+=0A=
+ CHECK_STRING (var);=0A=
+ if (getenv_internal (SDATA (var), SBYTES (var),=0A=
+ &value, &valuelen))=0A=
+ return make_string (value, valuelen);=0A=
+ else=0A=
+ return Qnil;=0A=
+}=0A=
+=0A=
+/* A version of getenv that consults process_environment, easily=0A=
+ callable from C. */=0A=
+char *=0A=
+egetenv (var)=0A=
+ char *var;=0A=
+{=0A=
+ char *value;=0A=
+ int valuelen;=0A=
+=0A=
+ if (getenv_internal (var, strlen (var), &value, &valuelen))=0A=
+ return value;=0A=
+ else=0A=
+ return 0;=0A=
+}=0A=
+=0A=
static Lisp_Object=0A=
call_process_kill (fdpid)=0A=
@@ -1426,71 +1493,4 @@=0A=
return new;=0A=
}=0A=
- -}=0A=
- -=0A=
- -static int=0A=
- -getenv_internal (var, varlen, value, valuelen)=0A=
- - char *var;=0A=
- - int varlen;=0A=
- - char **value;=0A=
- - int *valuelen;=0A=
- -{=0A=
- - Lisp_Object scan;=0A=
- -=0A=
- - for (scan =3D Vprocess_environment; CONSP (scan); scan =3D XCDR =
(scan))=0A=
- - {=0A=
- - Lisp_Object entry;=0A=
- -=0A=
- - entry =3D XCAR (scan);=0A=
- - if (STRINGP (entry)=0A=
- - && SBYTES (entry) > varlen=0A=
- - && SREF (entry, varlen) =3D=3D '=3D'=0A=
- -#ifdef WINDOWSNT=0A=
- - /* NT environment variables are case insensitive. */=0A=
- - && ! strnicmp (SDATA (entry), var, varlen)=0A=
- -#else /* not WINDOWSNT */=0A=
- - && ! bcmp (SDATA (entry), var, varlen)=0A=
- -#endif /* not WINDOWSNT */=0A=
- - )=0A=
- - {=0A=
- - *value =3D (char *) SDATA (entry) + (varlen + 1);=0A=
- - *valuelen =3D SBYTES (entry) - (varlen + 1);=0A=
- - return 1;=0A=
- - }=0A=
- - }=0A=
- -=0A=
- - return 0;=0A=
- -}=0A=
- -=0A=
- -DEFUN ("getenv-internal", Fgetenv_internal, Sgetenv_internal, 1, 1, 0,=0A=
- - doc: /* Return the value of environment variable VAR, as a =
string.=0A=
- -VAR should be a string. Value is nil if VAR is undefined in the =
environment.=0A=
- -This function consults the variable ``process-environment'' for its =
value. */)=0A=
- - (var)=0A=
- - Lisp_Object var;=0A=
- -{=0A=
- - char *value;=0A=
- - int valuelen;=0A=
- -=0A=
- - CHECK_STRING (var);=0A=
- - if (getenv_internal (SDATA (var), SBYTES (var),=0A=
- - &value, &valuelen))=0A=
- - return make_string (value, valuelen);=0A=
- - else=0A=
- - return Qnil;=0A=
- -}=0A=
- -=0A=
- -/* A version of getenv that consults process_environment, easily=0A=
- - callable from C. */=0A=
- -char *=0A=
- -egetenv (var)=0A=
- - char *var;=0A=
- -{=0A=
- - char *value;=0A=
- - int valuelen;=0A=
- -=0A=
- - if (getenv_internal (var, strlen (var), &value, &valuelen))=0A=
- - return value;=0A=
- - else=0A=
- - return 0;=0A=
}=0A=
=0A=
- ------=_NextPart_000_0011_01C6108D.EAD8AEA0--
------- end -------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [h-e-w] Fwd: Fw: compiling emacs using msys (correction),
Geoff Voelker <=