From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: A few Windows build fixes Date: Mon, 29 Aug 2011 02:15:53 -0400 Message-ID: References: <83vcth40ik.fsf@kalahari.s2.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1314598563 32468 80.91.229.12 (29 Aug 2011 06:16:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 29 Aug 2011 06:16:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: Hannu Koivisto Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 29 08:15:59 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qxv8Z-00006q-3z for ged-emacs-devel@m.gmane.org; Mon, 29 Aug 2011 08:15:59 +0200 Original-Received: from localhost ([::1]:57848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qxv8Y-00085L-Cn for ged-emacs-devel@m.gmane.org; Mon, 29 Aug 2011 02:15:58 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:47927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qxv8V-0007w1-FM for emacs-devel@gnu.org; Mon, 29 Aug 2011 02:15:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qxv8U-0000Nw-7s for emacs-devel@gnu.org; Mon, 29 Aug 2011 02:15:55 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:53520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qxv8U-0000Ns-5Z for emacs-devel@gnu.org; Mon, 29 Aug 2011 02:15:54 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Qxv8T-00007f-Ru; Mon, 29 Aug 2011 02:15:53 -0400 In-reply-to: <83vcth40ik.fsf@kalahari.s2.org> (message from Hannu Koivisto on Mon, 29 Aug 2011 01:46:59 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:143617 Archived-At: > From: Hannu Koivisto > Date: Mon, 29 Aug 2011 01:46:59 +0300 > > I wanted to build the latest bzr trunk version of Emacs for Windows > but soon realized that the makefiles and the configure process have > lots of problems. Only if you use Cygwin tools. With native (MinGW/GnuWin32) tools, there are no known problems, AFAIK. > I'm attaching four patches that fix enough of the problems that > building and installing with a modern Cygwin Thanks. > +if %MAKECMD% == gmake dos2unix config.tmp config.settings This requires users to have dos2unix installed, even if they don't use the Cygwin tools to build Emacs. If there's another way of doing this that doesn't require another non-standard utility (e.g., by setting some Cygwin-specific environment variable that is ignored by non-Cygwin programs), or else some alternative condition that will only fire with Cygwin Make being used, please modify this to use that. Otherwise, some other trick will be needed to avoid the extra requirement of having dos2unix on PATH. > --- a/nt/makefile.w32-in > +++ b/nt/makefile.w32-in Is there some real change here, or did you only change EOL format? If the former, please show just the changes in content. > Cygwin make doesn't like c:/foo/bar style paths at least in targets and > native Windows Emacs doesn't like Cygwin style /cygdrive/c/foo/bar paths. > Use relative paths to avoid the problem. It's true that the Cygwin build of Make doesn't support c:/foo in targets, but the Windows Makefiles never use such targets, except through $(CURDIR), which should return a Cygwin style file name with Cygwin Make. So I don't really see a problem that needs to be solved here. Perhaps I'm missing something; please show the actual problems you had with this part. In any case, I'd like to find a solution for this problem that targets Cygwin alone, if possible. Sprinkling quotes in 2 different styles all over the Makefiles is not my idea of fun, because the quoting issue is very fragile on Windows to begin with, especially since we try to support at least 3 or 4 different combinations of tools. > +CURDIR=. This will break "make -C", won't it? Or at least make it fragile and unreliable. > - - mkdir "$(INSTALLDIR)" > + - mkdir -p "$(INSTALLDIR)" Please don't. We don't want to rely on the assumption that `mkdir' is a GNU mkdir.exe. This command needs also to run when the shell is cmd.exe, and its built-in `mkdir' doesn't support the -p switch (it creates intermediate directories by default). There are more places where you use "mkdir -p"; please find some other solution for that particular problem, or let's leave it unsolved, as no one has complained until now, AFAIR. > +INSTALL_DIR_MIXED := $(INSTALL_DIR) > +ifeq "$(shell cygpath $(INSTALL_DIR))" "$(INSTALL_DIR)" > +INSTALL_DIR_MIXED := $(shell cygpath -m "$(INSTALL_DIR)") > +endif I don't understand the need for this gork. Please explain. Is the Cygwin build supposed to use Cygwin `cp' etc., or their native versions? In any case, why do we need both INSTALL_DIR and INSTALL_DIR_MIXED? If both are needed, we will need a corresponding change in nmake.defs. Thanks again for working on this.