* nt/configure.bat: Renamed the fusercflags variable to escusercflags
authorBen Key <bkey76@gmail.com>
Sat, 7 May 2011 04:00:12 +0000 (23:00 -0500)
committerBen Key <bkey76@gmail.com>
Sat, 7 May 2011 04:00:12 +0000 (23:00 -0500)
so that the variable name better matches its purpose, to be identical
to usercflags with the exception that all quotes are escaped by the \
character.

Renamed the fuserldflags variable to escuserldflags so that the
variable name better matches its purpose, to be identical to
userldflags with the exception that all quotes are escaped by the \
character.

A new ESC_USER_CFLAGS variable is written to config.settings.  This
variable has the same value as the escusercflags variable.

* nt/gmake.defs, nt/nmake.defs: Added the variable ESC_CFLAGS.  This
variable is identical to the CFLAGS variable except that it includes
the new ESC_USER_CFLAGS variable instead of USER_CFLAGS.

* src/makefile.w32-in: The bootstrap-temacs rule now makes use of one
of two shell specific rules, either bootstrap-temacs-CMD or
bootstrap-temacs-SH.  The bootstrap-temacs-SH rule is identical to the
previous implementation of the bootstrap-temacs rule.  The
bootstrap-temacs-CMD rule is similar to the previous implementation of
the bootstrap-temacs rule except that it makes use of the ESC_CFLAGS
variable instead of the CFLAGS variable.

These changes are required to extend my earlier fix to add support for
--cflags and --ldflags options that include quotes so that it works
whether make uses cmd or sh as the shell.

nt/ChangeLog
nt/configure.bat
nt/gmake.defs
nt/nmake.defs
src/ChangeLog
src/makefile.w32-in

index 6ad8063..5d69142 100644 (file)
@@ -1,3 +1,27 @@
+2011-05-07  Ben Key  <bkey76@gmail.com>
+
+       * configure.bat: Renamed the fusercflags variable to escusercflags
+       so that the variable name better matches its purpose, to be
+       identical to usercflags with the exception that all quotes are
+       escaped by the \ character.
+
+       Renamed the fuserldflags variable to escuserldflags so that the
+       variable name better matches its purpose, to be identical to
+       userldflags with the exception that all quotes are escaped by
+       the \ character.
+
+       A new ESC_USER_CFLAGS variable is written to config.settings.
+       This variable has the same value as the escusercflags variable.
+
+       * gmake.defs, nmake.defs: Added the variable ESC_CFLAGS.  This
+       variable is identical to the CFLAGS variable except that it
+       includes the new ESC_USER_CFLAGS variable instead of USER_CFLAGS.
+
+       These changes, along with some changes to src/makefile.w32-in,
+       are required to extend my earlier fix to add support for
+       --cflags and --ldflags options that include quotes so that it
+       works whether make uses cmd or sh as the shell.
+
 2011-05-06  Eli Zaretskii  <eliz@gnu.org>
 
        * inc/inttypes.h [!__MINGW32__]: Include stdint.h.  Move the
index 63d9497..45d966f 100755 (executable)
@@ -97,10 +97,10 @@ set profile=N
 set nocygwin=N\r
 set COMPILER=\r
 set usercflags=\r
-set fusercflags=\r
+set escusercflags=\r
 set docflags=\r
 set userldflags=\r
-set fuserldflags=\r
+set escuserldflags=\r
 set extrauserlibs=\r
 set doldflags=\r
 set doextralibs=\r
@@ -240,7 +240,7 @@ goto ucflagne
 :ucflagex\r
 shift\r
 set usercflags=%usercflags%%sep1%%~1\r
-set fusercflags=%usercflags:"=\"%\r
+set escusercflags=%usercflags:"=\"%\r
 set sep1= %nothing%\r
 shift\r
 goto again\r
@@ -248,7 +248,7 @@ goto again
 :ucflagne\r
 shift\r
 set usercflags=%usercflags%%sep1%%1\r
-set fusercflags=%usercflags%\r
+set escusercflags=%usercflags%\r
 set sep1= %nothing%\r
 shift\r
 goto again\r
@@ -270,7 +270,7 @@ goto ulflagne
 :ulflagex\r
 shift\r
 set userldflags=%userldflags%%sep2%%~1\r
-set fuserldflags=%userldflags:"=\"%\r
+set escuserldflags=%userldflags:"=\"%\r
 set sep2= %nothing%\r
 shift\r
 goto again\r
@@ -278,7 +278,7 @@ goto again
 :ulflagne\r
 shift\r
 set userldflags=%userldflags%%sep2%%1\r
-set fuserldflags=%userldflags%\r
+set escuserldflags=%userldflags%\r
 set sep2= %nothing%\r
 shift\r
 goto again\r
@@ -443,7 +443,7 @@ goto nocompiler
 :chkuser\r
 rm -f junk.o\r
 echo int main (int argc, char *argv[]) {>junk.c\r
-echo char *usercflags = "%fusercflags%";>>junk.c\r
+echo char *usercflags = "%escusercflags%";>>junk.c\r
 echo }>>junk.c\r
 echo gcc -Werror -c junk.c >>config.log\r
 gcc -Werror -c junk.c >>config.log 2>&1\r
@@ -739,6 +739,7 @@ rem We go thru docflags because usercflags could be "-DFOO=bar" -something
 rem and the if command cannot cope with this\r
 for %%v in (%usercflags%) do if not (%%v)==() set docflags=Y\r
 if (%docflags%)==(Y) echo USER_CFLAGS=%usercflags%>>config.settings\r
+if (%docflags%)==(Y) echo ESC_USER_CFLAGS=%escusercflags%>>config.settings\r
 for %%v in (%userldflags%) do if not (%%v)==() set doldflags=Y\r
 if (%doldflags%)==(Y) echo USER_LDFLAGS=%userldflags%>>config.settings\r
 for %%v in (%extrauserlibs%) do if not (%%v)==() set doextralibs=Y\r
@@ -751,8 +752,8 @@ echo. >>config.tmp
 echo /* Start of settings from configure.bat.  */ >>config.tmp\r
 rem   We write USER_CFLAGS and USER_LDFLAGS starting with a space to simplify\r
 rem   processing of compiler options in w32.c:get_emacs_configuration_options\r
-if (%docflags%) == (Y) echo #define USER_CFLAGS " %fusercflags%">>config.tmp\r
-if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %fuserldflags%">>config.tmp\r
+if (%docflags%) == (Y) echo #define USER_CFLAGS " %escusercflags%">>config.tmp\r
+if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %escuserldflags%">>config.tmp\r
 if (%profile%) == (Y) echo #define PROFILING 1 >>config.tmp\r
 if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp\r
 if not "(%HAVE_GNUTLS%)" == "()" echo #define HAVE_GNUTLS 1 >>config.tmp\r
index dcc43c9..bbb5602 100644 (file)
@@ -206,6 +206,7 @@ CHECKING_CFLAGS     =
 endif
 
 CFLAGS          = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(CHECKING_CFLAGS) $(PROFILE_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
+ESC_CFLAGS      = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(CHECKING_CFLAGS) $(PROFILE_CFLAGS) $(ESC_USER_CFLAGS) $(LOCAL_FLAGS)
 EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1
 
 ifdef PROFILE
index a150aaf..6c0922d 100644 (file)
@@ -144,6 +144,8 @@ CHECKING_CFLAGS     =
 \r
 CFLAGS          = -I. $(ARCH_CFLAGS) \\r
                  $(DEBUG_CFLAGS) $(CHECKING_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)\r
+ESC_CFLAGS      = -I. $(ARCH_CFLAGS) \\r
+                 $(DEBUG_CFLAGS) $(CHECKING_CFLAGS) $(ESC_USER_CFLAGS) $(LOCAL_FLAGS)\r
 EMACS_EXTRA_C_FLAGS =\r
 \r
 SYS_LDFLAGS    = -nologo -release -incremental:no -version:3.10 -swaprun:cd -swaprun:net setargv.obj\r
index 598d1fd..199c270 100644 (file)
@@ -1,3 +1,20 @@
+2011-05-07  Ben Key  <bkey76@gmail.com>
+
+       * makefile.w32-in: The bootstrap-temacs rule now makes use of
+       one of two shell specific rules, either bootstrap-temacs-CMD or
+       bootstrap-temacs-SH.  The bootstrap-temacs-SH rule is identical
+       to the previous implementation of the bootstrap-temacs rule.
+       The bootstrap-temacs-CMD rule is similar to the previous
+       implementation of the bootstrap-temacs rule except that it
+       makes use of the ESC_CFLAGS variable instead of the CFLAGS
+       variable.
+
+       These changes, along with some changes to nt/configure.bat,
+       nt/gmake.defs, and nt/nmake.defs, are required to extend my
+       earlier fix to add support for --cflags and --ldflags options
+       that include quotes so that it works whether make uses cmd or
+       sh as the shell.
+
 2011-05-06  Michael Albinus  <michael.albinus@gmx.de>
 
        * dbusbind.c (QCdbus_type_unix_fd): Declare static.
index fb216eb..e19a196 100644 (file)
@@ -244,9 +244,15 @@ bootstrap: bootstrap-emacs
 #
 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
 #          this can break with GNU Make 3.81 and later if sh.exe is used.
-bootstrap-temacs:
+bootstrap-temacs-CMD:
+       $(MAKE) $(MFLAGS) $(XMFLAGS) temacs CFLAGS=$(ARGQUOTE)$(ESC_CFLAGS) -DPURESIZE=5000000$(ARGQUOTE)
+
+bootstrap-temacs-SH:
        $(MAKE) $(MFLAGS) $(XMFLAGS) temacs CFLAGS=$(ARGQUOTE)$(CFLAGS) -DPURESIZE=5000000$(ARGQUOTE)
 
+bootstrap-temacs:
+       $(MAKE) $(MFLAGS) bootstrap-temacs-$(SHELLTYPE)
+
 #
 # Dump an Emacs executable named bootstrap-emacs containing the
 # files from loadup.el in source form.