[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make dist target for Windows

From: Christoph
Subject: Re: make dist target for Windows
Date: Mon, 05 Apr 2010 20:12:53 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv: Gecko/20100317 Thunderbird/3.0.4

On 4/4/2010 1:10 AM, Eli Zaretskii wrote:
You set distFilesOk here, but you never unset it before exiting the
Missed one. Fixed.

Hmm... did you try running "make dist" with some sh.exe on your PATH?
I think it's not a good idea to rely on a Unixy shell to know how to
run Windows batch files.  I would suggest to invoke through the
Windows shell explicitly:

        $(COMSPEC) /c $(ARGQUOTE)zipdist.bat $(DQUOTE)$(INSTALL_DIR)$(DQUOTE) 

The $(*QUOTE) stuff is needed in case $(INSTALL_DIR) includes spaces,
but please test that this works, both with cmd.exe and sh.exe as the
shell, because I didn't.
I tried this but it doesnt work, neither with a shell (cygwin) or cmd.exe:


(Note the camelcase-ing of ComSpec which is necessary for Windows NT to find cmd.exe. The makefile has a couple of paragraphs on this topic in the NOTES section at the top.)

However, I get the following error in both scenarios:

Using Cygwin, mingw32:
C:\Windows\system32\cmd.exe /c 'zipdist.bat "D:/devel/emacs/emacs-bzr/makedistw32/nt/.." 24.0.50'
devel was unexpected at this time.
mingw32-make: *** [dist] Error 255

Using Cmd.exe, GNU coreutils. mingw32:
C:\Windows\system32\cmd.exe /c "zipdist.bat \"D:/devel/emacs/emacs-bzr/makedistw32/nt/..\" 24.0.50"
devel was unexpected at this time.
mingw32-make: *** [dist] Error 255

Remove $(DQUOTE) and it works fine in both cases, but this will cause trouble if $(INSTALL_PATH) contains spaces.

Here is my preliminary final version:


This will work fine with the cygwin shell and Windows PreNT/NT cmd.exe as long as $(INSTALL_DIR) does not contain any spaces.

However, is the rest of the makefile capable of handling this case correctly? I see $(INSTALL_DIR) quoted in some places, some don't have quotes. The NOTES section of the makefile says that quoting helps making the forward slashes work in cmd.exe. It does not mention the support of spaces in file names.

Any ideas?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]