unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* NT mingw/msys build problem
@ 2004-10-25  8:28 Guy Gascoigne-Piggford
  2004-10-25  9:15 ` Jason Rumney
  2004-10-25 16:00 ` Lennart Borgman
  0 siblings, 2 replies; 12+ messages in thread
From: Guy Gascoigne-Piggford @ 2004-10-25  8:28 UTC (permalink / raw)


I've been trying to track down a problem that my NT build has when 
building with the latest mingw+msys environment.  Emacs builds and runs, 
but certain autoloads seem to be missing, after much hunting through 
build logs I ended out with this being the cause of the problem:

Eventually make runs this:

"./../bin/emacs.exe" -batch --no-init-file --no-site-file --multibyte -l 
autoload \
    --eval '(setq find-file-hooks nil \
        find-file-suppress-same-file-warnings t \
        generated-autoload-file \
          "c:/dev/emacs-src/emacs/lisp/loaddefs.el")' \
    -f batch-update-autoloads c:/dev/emacs-src/emacs/lisp calc calendar 
emacs-lisp emulation eshell gnus international language mail mh-e net 
obsolete play progmodes term textmodes toolbar url

the output of which is:

Wrote c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el
Loading vc-cvs...
Wrote c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el
Autoloads file 
c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el 
does not exist

I'm explicitly passing files of a style that I'd expect emacs to 
understand, but it looks like some part of the process is switching them 
back to dos style slashes and then passing them back to something that 
expects unix style names.

Anyway I'm a bit stumped as to how to work around this, has anyone else 
seen this or have a suggestion?

Guy

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: NT mingw/msys build problem
  2004-10-25  8:28 NT mingw/msys build problem Guy Gascoigne-Piggford
@ 2004-10-25  9:15 ` Jason Rumney
  2004-10-25 22:41   ` Guy Gascoigne-Piggford
  2004-10-25 16:00 ` Lennart Borgman
  1 sibling, 1 reply; 12+ messages in thread
From: Jason Rumney @ 2004-10-25  9:15 UTC (permalink / raw)
  Cc: Emacs Devel

Guy Gascoigne-Piggford wrote:

> I've been trying to track down a problem that my NT build has when 
> building with the latest mingw+msys environment.  Emacs builds and 
> runs, but certain autoloads seem to be missing, after much hunting 
> through build logs I ended out with this being the cause of the problem:
>
> Eventually make runs this:
>
> "./../bin/emacs.exe" -batch --no-init-file --no-site-file --multibyte 
> -l autoload \
>    --eval '(setq find-file-hooks nil \
>        find-file-suppress-same-file-warnings t \
>        generated-autoload-file \
>          "c:/dev/emacs-src/emacs/lisp/loaddefs.el")' \
>    -f batch-update-autoloads c:/dev/emacs-src/emacs/lisp calc calendar 
> emacs-lisp emulation eshell gnus international language mail mh-e net 
> obsolete play progmodes term textmodes toolbar url
>
> the output of which is:
>
> Wrote 
> c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el
> Loading vc-cvs...
> Wrote 
> c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el
> Autoloads file 
> c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el 
> does not exist

I think that looks like what I got when I tried msys several months ago. 
The workaround I used was "make SHELL=cmd.exe", or rename sh.exe from 
msys to some other name.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: NT mingw/msys build problem
  2004-10-25  8:28 NT mingw/msys build problem Guy Gascoigne-Piggford
  2004-10-25  9:15 ` Jason Rumney
@ 2004-10-25 16:00 ` Lennart Borgman
  2004-10-26 18:11   ` Guy Gascoigne - Piggford
  1 sibling, 1 reply; 12+ messages in thread
From: Lennart Borgman @ 2004-10-25 16:00 UTC (permalink / raw)


----- Original Message ----- 
From: "Guy Gascoigne-Piggford" <guy@wyrdrune.com>
To: "Emacs Devel" <emacs-devel@gnu.org>
Sent: Monday, October 25, 2004 10:28 AM
Subject: NT mingw/msys build problem


: I've been trying to track down a problem that my NT build has when
: building with the latest mingw+msys environment.  Emacs builds and runs,
: but certain autoloads seem to be missing, after much hunting through
: build logs I ended out with this being the cause of the problem:
:
: Eventually make runs this:
:
: "./../bin/emacs.exe" -batch --no-init-file --no-site-file --multibyte -l
: autoload \
:     --eval '(setq find-file-hooks nil \
:         find-file-suppress-same-file-warnings t \
:         generated-autoload-file \
:           "c:/dev/emacs-src/emacs/lisp/loaddefs.el")' \
:     -f batch-update-autoloads c:/dev/emacs-src/emacs/lisp calc calendar
: emacs-lisp emulation eshell gnus international language mail mh-e net
: obsolete play progmodes term textmodes toolbar url
:
: the output of which is:
:
: Wrote c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el
: Loading vc-cvs...
: Wrote c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el
: Autoloads file
: c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el
: does not exist

This does not work because MSYS sh converts / to \ if the executable is
outside of MSYS /bin or /usr/bin. Maybe it is a good idea for some programs
but not for Emacs as can be seen here. Emacs must be handled as the programs
in the bin-directories (no path style conversion).

They should rethink the conversion a bit I believe. I will further this
example to MSYS mailing list.

- Lennart

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: NT mingw/msys build problem
  2004-10-25  9:15 ` Jason Rumney
@ 2004-10-25 22:41   ` Guy Gascoigne-Piggford
  2004-10-25 23:09     ` Jason Rumney
  0 siblings, 1 reply; 12+ messages in thread
From: Guy Gascoigne-Piggford @ 2004-10-25 22:41 UTC (permalink / raw)


Hmm, when I try doing a "make SHELL=cmd.exe" all I get is make hanging 
indefinately.  If I try to rename the msys /bin/sh.exe and just run make 
then I get a slew of errors about /bin/sh not existing and then make exits.

I'll take a more detailed look at this tonight when I get out of work.

As an aside though, can someone who can actually build emacs on NT tell 
me what environment they use for this?  I thought that I'd make my life 
easier by using mingw and msys, but I'm beginning to realise that this 
was a bit too optimistic.  Clearly there is some way to make this work, 
but it's not particularly obvious to me I'm afraid.

Guy


Jason Rumney wrote:

> Guy Gascoigne-Piggford wrote:
>
>> I've been trying to track down a problem that my NT build has when 
>> building with the latest mingw+msys environment.  Emacs builds and 
>> runs, but certain autoloads seem to be missing, after much hunting 
>> through build logs I ended out with this being the cause of the problem:
>>
>> Eventually make runs this:
>>
>> "./../bin/emacs.exe" -batch --no-init-file --no-site-file --multibyte 
>> -l autoload \
>>    --eval '(setq find-file-hooks nil \
>>        find-file-suppress-same-file-warnings t \
>>        generated-autoload-file \
>>          "c:/dev/emacs-src/emacs/lisp/loaddefs.el")' \
>>    -f batch-update-autoloads c:/dev/emacs-src/emacs/lisp calc 
>> calendar emacs-lisp emulation eshell gnus international language mail 
>> mh-e net obsolete play progmodes term textmodes toolbar url
>>
>> the output of which is:
>>
>> Wrote 
>> c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el
>> Loading vc-cvs...
>> Wrote 
>> c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el
>> Autoloads file 
>> c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el 
>> does not exist
>
>
> I think that looks like what I got when I tried msys several months 
> ago. The workaround I used was "make SHELL=cmd.exe", or rename sh.exe 
> from msys to some other name.
> .
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: NT mingw/msys build problem
  2004-10-25 22:41   ` Guy Gascoigne-Piggford
@ 2004-10-25 23:09     ` Jason Rumney
  2004-10-27  9:50       ` Lennart Borgman
  0 siblings, 1 reply; 12+ messages in thread
From: Jason Rumney @ 2004-10-25 23:09 UTC (permalink / raw)
  Cc: Emacs Devel

Guy Gascoigne-Piggford <guy@wyrdrune.com> writes:

> Hmm, when I try doing a "make SHELL=cmd.exe" all I get is make hanging
> indefinately.  If I try to rename the msys /bin/sh.exe and just run
> make then I get a slew of errors about /bin/sh not existing and then
> make exits.

I seem to recall that when I installed msys, it installed its own
version of make and renamed the previous copy as mingw-make. I renamed
it back, since it seems to be more reliable (but still requires the
SHELL=cmd.exe argument).

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: NT mingw/msys build problem
@ 2004-10-26  1:07 Fred Kunz
  0 siblings, 0 replies; 12+ messages in thread
From: Fred Kunz @ 2004-10-26  1:07 UTC (permalink / raw)


Release version of emacs 21.3 builds fine with MinGW
(http://www.mingw.org/download.shtml) and GNUWin32
(http://gnuwin32.sourceforge.net/packages.html) fileutils. The CVS
version also builds and if you want image support you also need to
install the GNUWin32 image libraries. NOTE: You need to make sure the
image library dlls are in your path when you run emacs if you build with
the image libraries. I currently use GNU make 3.80 and gcc 3.4 but I
have also build both the release and the CVS versions of EMACS with GNU
make 3.79 and numerous earlier version of GCC.

Guy if you or anyone else needs more details they can be provided.

-----Original Message-----
From: Guy Gascoigne-Piggford [mailto:guy@wyrdrune.com] 
Sent: Monday, October 25, 2004 3:42 PM
To: Emacs Devel
Subject: Re: NT mingw/msys build problem

Hmm, when I try doing a "make SHELL=cmd.exe" all I get is make hanging 
indefinately.  If I try to rename the msys /bin/sh.exe and just run make

then I get a slew of errors about /bin/sh not existing and then make
exits.

I'll take a more detailed look at this tonight when I get out of work.

As an aside though, can someone who can actually build emacs on NT tell 
me what environment they use for this?  I thought that I'd make my life 
easier by using mingw and msys, but I'm beginning to realise that this 
was a bit too optimistic.  Clearly there is some way to make this work, 
but it's not particularly obvious to me I'm afraid.

Guy


Jason Rumney wrote:

> Guy Gascoigne-Piggford wrote:
>
>> I've been trying to track down a problem that my NT build has when 
>> building with the latest mingw+msys environment.  Emacs builds and 
>> runs, but certain autoloads seem to be missing, after much hunting 
>> through build logs I ended out with this being the cause of the
problem:
>>
>> Eventually make runs this:
>>
>> "./../bin/emacs.exe" -batch --no-init-file --no-site-file --multibyte

>> -l autoload \
>>    --eval '(setq find-file-hooks nil \
>>        find-file-suppress-same-file-warnings t \
>>        generated-autoload-file \
>>          "c:/dev/emacs-src/emacs/lisp/loaddefs.el")' \
>>    -f batch-update-autoloads c:/dev/emacs-src/emacs/lisp calc 
>> calendar emacs-lisp emulation eshell gnus international language mail

>> mh-e net obsolete play progmodes term textmodes toolbar url
>>
>> the output of which is:
>>
>> Wrote 
>> c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el
>> Loading vc-cvs...
>> Wrote 
>> c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el
>> Autoloads file 
>> c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el 
>> does not exist
>
>
> I think that looks like what I got when I tried msys several months 
> ago. The workaround I used was "make SHELL=cmd.exe", or rename sh.exe 
> from msys to some other name.
> .
>


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: NT mingw/msys build problem
@ 2004-10-26  1:15 Fred Kunz
  0 siblings, 0 replies; 12+ messages in thread
From: Fred Kunz @ 2004-10-26  1:15 UTC (permalink / raw)


I also should point out that you need GNUWin32 texinfo to build the info
stuff. I needed to make some minor changes to the generated (after
running configure) makefiles in the lispref and man. I haven't had time
to investigate this further to determine whether there is really a bug
here or not.

-----Original Message-----
From: Fred Kunz 
Sent: Monday, October 25, 2004 6:08 PM
To: Guy Gascoigne-Piggford; Emacs Devel
Subject: RE: NT mingw/msys build problem

Release version of emacs 21.3 builds fine with MinGW
(http://www.mingw.org/download.shtml) and GNUWin32
(http://gnuwin32.sourceforge.net/packages.html) fileutils. The CVS
version also builds and if you want image support you also need to
install the GNUWin32 image libraries. NOTE: You need to make sure the
image library dlls are in your path when you run emacs if you build with
the image libraries. I currently use GNU make 3.80 and gcc 3.4 but I
have also build both the release and the CVS versions of EMACS with GNU
make 3.79 and numerous earlier version of GCC.

Guy if you or anyone else needs more details they can be provided.

-----Original Message-----
From: Guy Gascoigne-Piggford [mailto:guy@wyrdrune.com] 
Sent: Monday, October 25, 2004 3:42 PM
To: Emacs Devel
Subject: Re: NT mingw/msys build problem

Hmm, when I try doing a "make SHELL=cmd.exe" all I get is make hanging 
indefinately.  If I try to rename the msys /bin/sh.exe and just run make

then I get a slew of errors about /bin/sh not existing and then make
exits.

I'll take a more detailed look at this tonight when I get out of work.

As an aside though, can someone who can actually build emacs on NT tell 
me what environment they use for this?  I thought that I'd make my life 
easier by using mingw and msys, but I'm beginning to realise that this 
was a bit too optimistic.  Clearly there is some way to make this work, 
but it's not particularly obvious to me I'm afraid.

Guy


Jason Rumney wrote:

> Guy Gascoigne-Piggford wrote:
>
>> I've been trying to track down a problem that my NT build has when 
>> building with the latest mingw+msys environment.  Emacs builds and 
>> runs, but certain autoloads seem to be missing, after much hunting 
>> through build logs I ended out with this being the cause of the
problem:
>>
>> Eventually make runs this:
>>
>> "./../bin/emacs.exe" -batch --no-init-file --no-site-file --multibyte

>> -l autoload \
>>    --eval '(setq find-file-hooks nil \
>>        find-file-suppress-same-file-warnings t \
>>        generated-autoload-file \
>>          "c:/dev/emacs-src/emacs/lisp/loaddefs.el")' \
>>    -f batch-update-autoloads c:/dev/emacs-src/emacs/lisp calc 
>> calendar emacs-lisp emulation eshell gnus international language mail

>> mh-e net obsolete play progmodes term textmodes toolbar url
>>
>> the output of which is:
>>
>> Wrote 
>> c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el
>> Loading vc-cvs...
>> Wrote 
>> c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el
>> Autoloads file 
>> c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el 
>> does not exist
>
>
> I think that looks like what I got when I tried msys several months 
> ago. The workaround I used was "make SHELL=cmd.exe", or rename sh.exe 
> from msys to some other name.
> .
>


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel



_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: NT mingw/msys build problem
  2004-10-25 16:00 ` Lennart Borgman
@ 2004-10-26 18:11   ` Guy Gascoigne - Piggford
  0 siblings, 0 replies; 12+ messages in thread
From: Guy Gascoigne - Piggford @ 2004-10-26 18:11 UTC (permalink / raw)


Well I got everything built and working correctly.  In the end I had 
take msys off my path and use cygwin as the host instead.  That and 
mingw, and emacs build perfectly.

Thank you all for your help and suggestions.

Guy

Lennart Borgman wrote:

>----- Original Message ----- 
>From: "Guy Gascoigne-Piggford" <guy@wyrdrune.com>
>To: "Emacs Devel" <emacs-devel@gnu.org>
>Sent: Monday, October 25, 2004 10:28 AM
>Subject: NT mingw/msys build problem
>
>
>: I've been trying to track down a problem that my NT build has when
>: building with the latest mingw+msys environment.  Emacs builds and runs,
>: but certain autoloads seem to be missing, after much hunting through
>: build logs I ended out with this being the cause of the problem:
>:
>: Eventually make runs this:
>:
>: "./../bin/emacs.exe" -batch --no-init-file --no-site-file --multibyte -l
>: autoload \
>:     --eval '(setq find-file-hooks nil \
>:         find-file-suppress-same-file-warnings t \
>:         generated-autoload-file \
>:           "c:/dev/emacs-src/emacs/lisp/loaddefs.el")' \
>:     -f batch-update-autoloads c:/dev/emacs-src/emacs/lisp calc calendar
>: emacs-lisp emulation eshell gnus international language mail mh-e net
>: obsolete play progmodes term textmodes toolbar url
>:
>: the output of which is:
>:
>: Wrote c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el
>: Loading vc-cvs...
>: Wrote c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el
>: Autoloads file
>: c:/dev/emacs-src/emacs/lisp/c;C:Devmsys.0evacs-srcacslisploaddefs.el
>: does not exist
>
>This does not work because MSYS sh converts / to \ if the executable is
>outside of MSYS /bin or /usr/bin. Maybe it is a good idea for some programs
>but not for Emacs as can be seen here. Emacs must be handled as the programs
>in the bin-directories (no path style conversion).
>
>They should rethink the conversion a bit I believe. I will further this
>example to MSYS mailing list.
>
>- Lennart
>
>
>
>
>  
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: NT mingw/msys build problem
  2004-10-25 23:09     ` Jason Rumney
@ 2004-10-27  9:50       ` Lennart Borgman
  2004-10-27 10:21         ` Lennart Borgman
  2004-10-27 10:43         ` Jason Rumney
  0 siblings, 2 replies; 12+ messages in thread
From: Lennart Borgman @ 2004-10-27  9:50 UTC (permalink / raw)
  Cc: Emacs Devel

----- Original Message ----- 
From: "Jason Rumney" <jasonr@gnu.org>
To: "Guy Gascoigne-Piggford" <guy@wyrdrune.com>
Cc: "Emacs Devel" <emacs-devel@gnu.org>
Sent: Tuesday, October 26, 2004 1:09 AM
Subject: Re: NT mingw/msys build problem


: Guy Gascoigne-Piggford <guy@wyrdrune.com> writes:
:
: > Hmm, when I try doing a "make SHELL=cmd.exe" all I get is make hanging
: > indefinately.  If I try to rename the msys /bin/sh.exe and just run
: > make then I get a slew of errors about /bin/sh not existing and then
: > make exits.
:
: I seem to recall that when I installed msys, it installed its own
: version of make and renamed the previous copy as mingw-make. I renamed
: it back, since it seems to be more reliable (but still requires the
: SHELL=cmd.exe argument).

I do not know how make works, but I can't avoid the hang when MSYS sh.exe is
in the path. The hang is caused by $(shell echo) in the make file. This does
not return since it runs "cmd echo" and that starts a new shell without
doing "echo". Actually it is bad syntax. The syntax for cmd is

  CMD [/X | /Y] [/A | /U] [/Q] [[/C | /K] string]

You have to supply /C or /K for the string command to be carried out. (At
least this is the syntax on NT4 and I believe it has not changed.)

I do not understand why the test is made. It seems like make has found sh
already but it still wonders something about "shell". Why does make do that?
It still makes the test even if SHELL=cmd.exe is given as a parameter.

I do not believe that everything can be done from with cmd.exe as the shell.
The problem that Guy found with

  "./../bin/emacs.exe" -batch --no-init-file --no-site-file --multibyte -l
  autoload \
    --eval '(setq find-file-hooks nil \
        find-file-suppress-same-file-warnings t \
        generated-autoload-file \
          "c:/dev/emacs-src/emacs/lisp/loaddefs.el")'  ...

can not be resolved unless this is rewritten in some way. cmd.exe can't
handle the parameters. The eval must be put in some temporary file that is
loaded with " -load temporary-file" to solve this. Can this be done? Does
make support doing this?

So at the moment there is actually no other way to build Emacs on ms windows
than using Cygwin as far as I can see. (And that might not be an option for
all since it is a rather big download if I remember correctly.) Both MSYS
and CMD.EXE fails because of parameter problems. (There might be some other
shell for ms windows available that solves this problem but I am not aware
of it. Someone knows?)

- Lennart

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: NT mingw/msys build problem
  2004-10-27  9:50       ` Lennart Borgman
@ 2004-10-27 10:21         ` Lennart Borgman
  2004-10-27 10:43         ` Jason Rumney
  1 sibling, 0 replies; 12+ messages in thread
From: Lennart Borgman @ 2004-10-27 10:21 UTC (permalink / raw)
  Cc: Emacs Devel

----- Original Message ----- 
From: "Lennart Borgman" <lennart.borgman.073@student.lu.se>

: I do not believe that everything can be done from with cmd.exe as the
shell.
: The problem that Guy found with
:
:   "./../bin/emacs.exe" -batch --no-init-file --no-site-file --multibyte -l
:   autoload \
:     --eval '(setq find-file-hooks nil \
:         find-file-suppress-same-file-warnings t \
:         generated-autoload-file \
:           "c:/dev/emacs-src/emacs/lisp/loaddefs.el")'  ...
:
: can not be resolved unless this is rewritten in some way. cmd.exe can't
: handle the parameters. The eval must be put in some temporary file that is
: loaded with " -load temporary-file" to solve this. Can this be done? Does
: make support doing this?

This was WRONG! I should have read the makefile sources first. It seems to
be solved there (by using $(ARGQUOTE) and $(DQUOTE). So it seems that there
is a rather simple way to build Emacs on ms windows (if MSYS sh is not in
the path).

- Lennart

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: NT mingw/msys build problem
  2004-10-27  9:50       ` Lennart Borgman
  2004-10-27 10:21         ` Lennart Borgman
@ 2004-10-27 10:43         ` Jason Rumney
  2004-10-27 19:16           ` Lennart Borgman
  1 sibling, 1 reply; 12+ messages in thread
From: Jason Rumney @ 2004-10-27 10:43 UTC (permalink / raw)
  Cc: Guy Gascoigne-Piggford, Emacs Devel

Lennart Borgman wrote:

>I do not know how make works, but I can't avoid the hang when MSYS sh.exe is
>in the path. The hang is caused by $(shell echo) in the make file. This does
>not return since it runs "cmd echo" and that starts a new shell without
>doing "echo". Actually it is bad syntax. The syntax for cmd is
>
>  CMD [/X | /Y] [/A | /U] [/Q] [[/C | /K] string]
>
>You have to supply /C or /K for the string command to be carried out. (At
>least this is the syntax on NT4 and I believe it has not changed.)
>
>  
>
The $(shell COMMAND) macro should provide the correct arguments. That is 
the way cygwin and mingw32 make work, msys seems to be the only broken 
one in this regard.

>I do not understand why the test is made. It seems like make has found sh
>already but it still wonders something about "shell". Why does make do that?
>  
>
Make should know the shell already, but the Emacs makefiles do not. They 
need to do that test to find out.

>So at the moment there is actually no other way to build Emacs on ms windows
>than using Cygwin as far as I can see.
>
I use mingw and cmd.exe. The key is to stay clear of msys.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: NT mingw/msys build problem
  2004-10-27 10:43         ` Jason Rumney
@ 2004-10-27 19:16           ` Lennart Borgman
  0 siblings, 0 replies; 12+ messages in thread
From: Lennart Borgman @ 2004-10-27 19:16 UTC (permalink / raw)
  Cc: Guy Gascoigne-Piggford, Kees Zeelenberg, Emacs Devel

----- Original Message ----- 
From: "Jason Rumney" <jasonr@gnu.org>

: >I do not know how make works, but I can't avoid the hang when MSYS sh.exe
is
: >in the path. The hang is caused by $(shell echo) in the make file. This
does
: >not return since it runs "cmd echo" and that starts a new shell without
: >doing "echo". Actually it is bad syntax. The syntax for cmd is
...
: The $(shell COMMAND) macro should provide the correct arguments. That is
: the way cygwin and mingw32 make work, msys seems to be the only broken
: one in this regard.

There is something I do not understand here. Is not "shell" here cmd.exe? If
the parameters should be changed from "cmd echo" to "cmd /c echo" must it
not be made by GNU make? As far as I can see from this debug output from GNU
make it gives the parameter -c instead of /c to cmd.exe:

  C:\emacscvs\emacs\nt>make -d SHELL=cmd.exe
  GNU Make 3.80
  Copyright (C) 2002  Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.
  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
  PARTICULAR PURPOSE.
  find_and_set_shell path search set default_shell = e:/msys/1.0/bin/sh.exe
  Reading makefiles...
  Reading makefile `makefile'...
  CreateProcess(C:\WINNT\System32\cmd.exe,cmd.exe -c echo,...)

When MSYS sh is not in the path a totally different route seem to be taken
by GNU Make:

  C:\emacscvs\emacs\nt>make -d SHELL=cmd.exe
  GNU Make 3.80
  Copyright (C) 2002  Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.
  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
  PARTICULAR PURPOSE.
  Reading makefiles...
  Reading makefile `makefile'...
  Creating temporary batch file C:\TEMP\make2692.bat
  CreateProcess(C:\TEMP\make2692.bat,C:\TEMP\make2692.bat,...)
  Cleaning up temporary batch file C:\TEMP\make2692.bat

Does not this look as a bug in GNU make when run on ms windows? I guess some
change must be made when porting to ms windows to GNU make to make it
recognize cmd.exe at all?



: >I do not understand why the test is made. It seems like make has found sh
: >already but it still wonders something about "shell". Why does make do
that?
: >
: >
: Make should know the shell already, but the Emacs makefiles do not. They
: need to do that test to find out.

I am surprised - is there no simple way to check the file name of the shell
executable? Or is that not considered reliable?


- Lennart

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-10-27 19:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-25  8:28 NT mingw/msys build problem Guy Gascoigne-Piggford
2004-10-25  9:15 ` Jason Rumney
2004-10-25 22:41   ` Guy Gascoigne-Piggford
2004-10-25 23:09     ` Jason Rumney
2004-10-27  9:50       ` Lennart Borgman
2004-10-27 10:21         ` Lennart Borgman
2004-10-27 10:43         ` Jason Rumney
2004-10-27 19:16           ` Lennart Borgman
2004-10-25 16:00 ` Lennart Borgman
2004-10-26 18:11   ` Guy Gascoigne - Piggford
  -- strict thread matches above, loose matches on Subject: below --
2004-10-26  1:07 Fred Kunz
2004-10-26  1:15 Fred Kunz

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).