diff options
| author | Eli Zaretskii | 2007-10-20 12:28:52 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2007-10-20 12:28:52 +0000 |
| commit | 3a1ebd63a60c3d694cce9528a50d9bf8be5c124d (patch) | |
| tree | be00557185806b3f39915f8b364facc7dfa944b4 | |
| parent | 6d005ee796965a65921bc426129203bcecb7eb87 (diff) | |
| download | emacs-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/ChangeLog | 4 | ||||
| -rwxr-xr-x | nt/configure.bat | 21 |
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 @@ | |||
| 1 | 2007-10-20 Eli Zaretskii <eliz@gnu.org> | 1 | 2007-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 | ||
| 5 | 2007-10-18 Jason Rumney <jasonr@gnu.org> | 7 | 2007-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 | |||
| 84 | set nocygwin=N | 84 | set nocygwin=N |
| 85 | set COMPILER= | 85 | set COMPILER= |
| 86 | set usercflags= | 86 | set usercflags= |
| 87 | set docflags= | ||
| 87 | set userldflags= | 88 | set userldflags= |
| 89 | set doldflags= | ||
| 88 | set sep1= | 90 | set sep1= |
| 89 | set sep2= | 91 | set sep2= |
| 90 | 92 | ||
| @@ -158,15 +160,14 @@ goto again | |||
| 158 | rem ---------------------------------------------------------------------- | 160 | rem ---------------------------------------------------------------------- |
| 159 | :usercflags | 161 | :usercflags |
| 160 | shift | 162 | shift |
| 161 | rem We quote arg here to leave quotes in the likes of "-DFOO=bar" | 163 | set usercflags=%usercflags%%sep1%%1 |
| 162 | set usercflags=%usercflags%%sep1%"%1" | ||
| 163 | set sep1= %nothing% | 164 | set sep1= %nothing% |
| 164 | shift | 165 | shift |
| 165 | goto again | 166 | goto again |
| 166 | rem ---------------------------------------------------------------------- | 167 | rem ---------------------------------------------------------------------- |
| 167 | :userldflags | 168 | :userldflags |
| 168 | shift | 169 | shift |
| 169 | set userldflags=%userldflags%%sep2%"%1" | 170 | set userldflags=%userldflags%%sep2%%1 |
| 170 | set sep2= %nothing% | 171 | set sep2= %nothing% |
| 171 | shift | 172 | shift |
| 172 | goto again | 173 | goto again |
| @@ -474,16 +475,20 @@ if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings | |||
| 474 | if (%noopt%) == (Y) echo NOOPT=1 >>config.settings | 475 | if (%noopt%) == (Y) echo NOOPT=1 >>config.settings |
| 475 | if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings | 476 | if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings |
| 476 | if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings | 477 | if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings |
| 477 | if not "(%usercflags%)" == "()" echo USER_CFLAGS=%usercflags%>>config.settings | 478 | rem We go thru docflags because usercflags could be "-DFOO=bar" -something |
| 478 | if not "(%userldflags%)" == "()" echo USER_LDFLAGS=%userldflags%>>config.settings | 479 | rem and the if command cannot cope with this |
| 480 | for %%v in (%usercflags%) do if not (%%v)==() set docflags=Y | ||
| 481 | if (%docflags%)==(Y) echo USER_CFLAGS=%usercflags%>>config.settings | ||
| 482 | for %%v in (%userldflags%) do if not (%%v)==() set doldflags=Y | ||
| 483 | if (%doldflags%)==(Y) echo USER_LDFLAGS=%userldflags%>>config.settings | ||
| 479 | echo # End of settings from configure.bat>>config.settings | 484 | echo # End of settings from configure.bat>>config.settings |
| 480 | echo. >>config.settings | 485 | echo. >>config.settings |
| 481 | 486 | ||
| 482 | copy config.nt config.tmp | 487 | copy config.nt config.tmp |
| 483 | echo. >>config.tmp | 488 | echo. >>config.tmp |
| 484 | echo /* Start of settings from configure.bat. */ >>config.tmp | 489 | echo /* Start of settings from configure.bat. */ >>config.tmp |
| 485 | if not "(%usercflags%)" == "()" echo #define USER_CFLAGS " %usercflags%">>config.tmp | 490 | if (%docflags%) == (Y) echo #define USER_CFLAGS " %usercflags%">>config.tmp |
| 486 | if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>config.tmp | 491 | if (%doldflags%) == (Y) echo #define USER_LDFLAGS " %userldflags%">>config.tmp |
| 487 | if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp | 492 | if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp |
| 488 | if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>config.tmp | 493 | if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>config.tmp |
| 489 | if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp | 494 | if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp |
| @@ -597,7 +602,9 @@ set nocygwin= | |||
| 597 | set COMPILER= | 602 | set COMPILER= |
| 598 | set MAKECMD= | 603 | set MAKECMD= |
| 599 | set usercflags= | 604 | set usercflags= |
| 605 | set docflags= | ||
| 600 | set userldflags= | 606 | set userldflags= |
| 607 | set doldflags= | ||
| 601 | set mingwflag= | 608 | set mingwflag= |
| 602 | set mf= | 609 | set mf= |
| 603 | 610 | ||