aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2007-10-20 12:28:52 +0000
committerEli Zaretskii2007-10-20 12:28:52 +0000
commit3a1ebd63a60c3d694cce9528a50d9bf8be5c124d (patch)
treebe00557185806b3f39915f8b364facc7dfa944b4
parent6d005ee796965a65921bc426129203bcecb7eb87 (diff)
downloademacs-3a1ebd63a60c3d694cce9528a50d9bf8be5c124d.tar.gz
emacs-3a1ebd63a60c3d694cce9528a50d9bf8be5c124d.zip
A better solution for the last change:
(docflags, doldflags): New variables. (genmakefiles): Use them to work around problems with whitespace in arguments of the `if' command.
-rw-r--r--nt/ChangeLog4
-rwxr-xr-xnt/configure.bat21
2 files changed, 17 insertions, 8 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog
index e36d2fa863d..5ee99f3825d 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,6 +1,8 @@
12007-10-20 Eli Zaretskii <eliz@gnu.org> 12007-10-20 Eli Zaretskii <eliz@gnu.org>
2 2
3 * configure.bat (usercflags, userldflags): Quote %1. 3 * configure.bat (docflags, doldflags): New variables.
4 (genmakefiles): Use them to work around problems with whitespace
5 in arguments of the `if' command.
4 6
52007-10-18 Jason Rumney <jasonr@gnu.org> 72007-10-18 Jason Rumney <jasonr@gnu.org>
6 8
diff --git a/nt/configure.bat b/nt/configure.bat
index 3782f1f749f..ef0a746949b 100755
--- a/nt/configure.bat
+++ b/nt/configure.bat
@@ -84,7 +84,9 @@ set noopt=N
84set nocygwin=N 84set nocygwin=N
85set COMPILER= 85set COMPILER=
86set usercflags= 86set usercflags=
87set docflags=
87set userldflags= 88set userldflags=
89set doldflags=
88set sep1= 90set sep1=
89set sep2= 91set sep2=
90 92
@@ -158,15 +160,14 @@ goto again
158rem ---------------------------------------------------------------------- 160rem ----------------------------------------------------------------------
159:usercflags 161:usercflags
160shift 162shift
161rem We quote arg here to leave quotes in the likes of "-DFOO=bar" 163set usercflags=%usercflags%%sep1%%1
162set usercflags=%usercflags%%sep1%"%1"
163set sep1= %nothing% 164set sep1= %nothing%
164shift 165shift
165goto again 166goto again
166rem ---------------------------------------------------------------------- 167rem ----------------------------------------------------------------------
167:userldflags 168:userldflags
168shift 169shift
169set userldflags=%userldflags%%sep2%"%1" 170set userldflags=%userldflags%%sep2%%1
170set sep2= %nothing% 171set sep2= %nothing%
171shift 172shift
172goto again 173goto again
@@ -474,16 +475,20 @@ if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings
474if (%noopt%) == (Y) echo NOOPT=1 >>config.settings 475if (%noopt%) == (Y) echo NOOPT=1 >>config.settings
475if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings 476if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings
476if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings 477if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings
477if not "(%usercflags%)" == "()" echo USER_CFLAGS=%usercflags%>>config.settings 478rem We go thru docflags because usercflags could be "-DFOO=bar" -something
478if not "(%userldflags%)" == "()" echo USER_LDFLAGS=%userldflags%>>config.settings 479rem and the if command cannot cope with this
480for %%v in (%usercflags%) do if not (%%v)==() set docflags=Y
481if (%docflags%)==(Y) echo USER_CFLAGS=%usercflags%>>config.settings
482for %%v in (%userldflags%) do if not (%%v)==() set doldflags=Y
483if (%doldflags%)==(Y) echo USER_LDFLAGS=%userldflags%>>config.settings
479echo # End of settings from configure.bat>>config.settings 484echo # End of settings from configure.bat>>config.settings
480echo. >>config.settings 485echo. >>config.settings
481 486
482copy config.nt config.tmp 487copy config.nt config.tmp
483echo. >>config.tmp 488echo. >>config.tmp
484echo /* Start of settings from configure.bat. */ >>config.tmp 489echo /* Start of settings from configure.bat. */ >>config.tmp
485if not "(%usercflags%)" == "()" echo #define USER_CFLAGS " %usercflags%">>config.tmp 490if (%docflags%) == (Y) echo #define USER_CFLAGS " %usercflags%">>config.tmp
486if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>config.tmp 491if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %userldflags%">>config.tmp
487if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp 492if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp
488if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>config.tmp 493if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>config.tmp
489if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp 494if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp
@@ -597,7 +602,9 @@ set nocygwin=
597set COMPILER= 602set COMPILER=
598set MAKECMD= 603set MAKECMD=
599set usercflags= 604set usercflags=
605set docflags=
600set userldflags= 606set userldflags=
607set doldflags=
601set mingwflag= 608set mingwflag=
602set mf= 609set mf=
603 610