From 2345fc78ffb35a7669e47605ad298d71da94fa15 Mon Sep 17 00:00:00 2001 From: Hannu Koivisto Date: Sun, 28 Aug 2011 23:00:00 +0300 Subject: [PATCH 3/4] NT build: fix path conflict with Cygwin make and native Emacs 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. --- leim/makefile.w32-in | 7 +++---- lisp/makefile.w32-in | 10 ++++++---- nt/gmake.defs | 13 ++++--------- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/leim/makefile.w32-in b/leim/makefile.w32-in index 2313843..736a49a 100644 --- a/leim/makefile.w32-in +++ b/leim/makefile.w32-in @@ -37,10 +37,9 @@ BUILT_EMACS = $(THISDIR)/$(dot)$(dot)/src/$(BLD)/emacs.exe buildlisppath=$(CURDIR)/$(dot)$(dot)/lisp # How to run Emacs. -RUN_EMACS = "$(BUILT_EMACS)" -batch --no-site-file --no-site-lisp - -# Set EMACSLOADPATH correctly (already defined in environment). -EMACSLOADPATH=$(buildlisppath) +RUN_EMACS = "$(BUILT_EMACS)" -batch --no-site-file --no-site-lisp \ + --eval $(ARGQUOTE)(push (expand-file-name $(DQUOTE)$(buildlisppath)$(DQUOTE)) load-path)$(ARGQUOTE) +EMACSLOADPATH= # Subdirectories to be made if $(srcdir) is different from the current # directory. diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in index c844a8f..4619776 100644 --- a/lisp/makefile.w32-in +++ b/lisp/makefile.w32-in @@ -33,7 +33,12 @@ EMACS = ../src/$(BLD)/emacs.exe # Command line flags for Emacs. -EMACSOPT = -batch --no-site-file --no-site-lisp +# Instead of using EMACSLOADPATH, which is cleared just in case, we'll rely +# on expanded current directory set in EMACSOPT so that relative CURDIR can +# be used. +EMACSOPT = -batch --no-site-file --no-site-lisp \ + --eval $(ARGQUOTE)(push (expand-file-name $(DQUOTE).$(DQUOTE)) load-path)$(ARGQUOTE) +EMACSLOADPATH= # Extra flags to pass to the byte compiler BYTE_COMPILE_EXTRA_FLAGS = @@ -41,9 +46,6 @@ BYTE_COMPILE_EXTRA_FLAGS = # BYTE_COMPILE_EXTRA_FLAGS = --eval '(setq byte-compile-warnings (quote (not unresolved)))' # The example above is just for developers, it should not be used by default. -# Set EMACSLOADPATH correctly (already defined in environment). -EMACSLOADPATH=$(lisp) - # Use C locale LC_ALL = C diff --git a/nt/gmake.defs b/nt/gmake.defs index bbb5602..2ceb216 100644 --- a/nt/gmake.defs +++ b/nt/gmake.defs @@ -77,15 +77,10 @@ endif MAKETYPE=gmake -# The following "ifeq" does not appear to DTRT, and therefore breaks -# the build on mingw32. Also the -m option does not exist in many -# (reasonably recent even) versions of Cygwin. These issues need to be -# remedied before putting this cygpath kludge back in. - -# Convert CURDIR to native file name, if in Cygwin format -#ifeq "$(shell cygpath $(CURDIR))" "$(CURDIR)" -#CURDIR := $(shell cygpath -m $(CURDIR)) -#endif +# Use relative CURDIR to work around the conflict of Cygwin make +# requiring /cygpath/c/.. style paths and native Windows Emacs not +# understanding them. +CURDIR=. THISDIR = . -- 1.7.7.rc0