Commit a879f0ea authored by Eli Zaretskii's avatar Eli Zaretskii

Fix bug #12955 with building under MSYS Bash.

 src/makefile.w32-in (globals.h, gl-stamp): Use $(SWITCHCHAR) instead
 of a literal "/".
 (gl-stamp): Invoke fc.exe directly, not through cmd.
parent 930a6273
2012-11-23 Eli Zaretskii <eliz@gnu.org>
* gmake.defs (SWITCHCHAR): Define to // under MSYS, / otherwise.
(Bug#12955)
* nmake.defs (SWITCHCHAR): Define to /.
2012-11-23 Paul Eggert <eggert@cs.ucla.edu>
Assume POSIX 1003.1-1988 or later for dirent.h (Bug#12958).
......
......@@ -69,10 +69,18 @@ sh_output := $(shell echo)
ifeq "$(findstring ECHO, $(sh_output))" "ECHO"
THE_SHELL = $(COMSPEC)$(ComSpec)
SHELLTYPE=CMD
SWITCHCHAR=/
else
USING_SH = 1
THE_SHELL = $(SHELL)
SHELLTYPE=SH
# MSYS needs to double the slash in cmd-style switches to avoid
# interpreting /x as a Posix style file name reference
ifneq ($(MSYSTEM),)
SWITCHCHAR=//
else
SWITCHCHAR=/
endif
endif
MAKETYPE=gmake
......
......@@ -22,6 +22,7 @@ all:
THE_SHELL = $(COMSPEC)
SHELLTYPE=CMD
SWITCHCHAR=/
MAKETYPE=nmake
......
2012-11-23 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (globals.h, gl-stamp): Use $(SWITCHCHAR) instead
of a literal "/". (Bug#12955)
(gl-stamp): Invoke fc.exe directly, not through cmd.
2012-11-23 Paul Eggert <eggert@cs.ucla.edu>
Assume POSIX 1003.1-1988 or later for dirent.h (Bug#12958).
......
......@@ -229,12 +229,12 @@ SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
obj = $(GLOBAL_SOURCES:.c=.o)
globals.h: gl-stamp
@cmd /c rem true
@cmd $(SWITCHCHAR)c rem true
gl-stamp: ../lib-src/$(BLD)/make-docfile.exe $(GLOBAL_SOURCES)
- $(DEL) gl-tmp
"$(THISDIR)/../lib-src/$(BLD)/make-docfile" -d . -g $(SOME_MACHINE_OBJECTS) $(obj) > gl-tmp
cmd /c "fc /b gl-tmp globals.h >nul 2>&1 || $(CP) gl-tmp globals.h"
fc.exe $(SWITCHCHAR)b gl-tmp globals.h >nul 2>&1 || $(CP) gl-tmp globals.h
- $(DEL) gl-tmp
echo timestamp > $@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment