diff options
| author | Ben Key | 2011-04-15 17:48:00 -0500 |
|---|---|---|
| committer | Ben Key | 2011-04-15 17:48:00 -0500 |
| commit | 4a1a6b5b7d2208cf504cf38e548d3c562f6cfbb3 (patch) | |
| tree | eb9b18d15d8b7b6b4ecc961ff8bd0495ffebfb54 | |
| parent | ba3bd5b6c3771010fa37ec48170eee8323b55bf1 (diff) | |
| download | emacs-4a1a6b5b7d2208cf504cf38e548d3c562f6cfbb3.tar.gz emacs-4a1a6b5b7d2208cf504cf38e548d3c562f6cfbb3.zip | |
Modified the code that parses the --cflags and --ldflags options to support parameters that include the = character as long as they are enclosed in quotes.
| -rw-r--r-- | nt/ChangeLog | 14 | ||||
| -rw-r--r-- | nt/INSTALL | 24 | ||||
| -rwxr-xr-x | nt/configure.bat | 49 |
3 files changed, 80 insertions, 7 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog index 155ee41d9da..19f71ba0af3 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2011-04-15 Ben Key <bkey76@gmail.com> | ||
| 2 | |||
| 3 | * configure.bat: Modified the code that parses the --cflags and | ||
| 4 | --ldflags options to support parameters that include the = | ||
| 5 | character as long as they are enclosed in quotes. This | ||
| 6 | functionality depends on command extensions. Configure.bat now | ||
| 7 | attempts to enable command extensions and displays a warning | ||
| 8 | message if they could not be enabled. If configure.bat could | ||
| 9 | not enable command extensions the old parsing code is used that | ||
| 10 | does not support parameters that include the = character. | ||
| 11 | |||
| 12 | * INSTALL: Updated the file to describe the new functionality | ||
| 13 | using text provided by Eli Zaretskii. | ||
| 14 | |||
| 1 | 2011-04-06 Eli Zaretskii <eliz@gnu.org> | 15 | 2011-04-06 Eli Zaretskii <eliz@gnu.org> |
| 2 | 16 | ||
| 3 | * config.nt (NO_INLINE, ATTRIBUTE_FORMAT) | 17 | * config.nt (NO_INLINE, ATTRIBUTE_FORMAT) |
diff --git a/nt/INSTALL b/nt/INSTALL index a0ca4a1ebb5..dfcfa8a205a 100644 --- a/nt/INSTALL +++ b/nt/INSTALL | |||
| @@ -220,13 +220,23 @@ | |||
| 220 | absolutely sure the produced binaries will never need to be run under | 220 | absolutely sure the produced binaries will never need to be run under |
| 221 | a debugger. | 221 | a debugger. |
| 222 | 222 | ||
| 223 | Because of limitations of the stock Windows command shell, certain | 223 | Because of limitations of the stock Windows command shells, special |
| 224 | characters (quotes, backslashes and equal signs) can be problematic | 224 | care is needed to pass some characters in the arguments of the |
| 225 | and should not be used in arguments to configure. That means that | 225 | --cflags and --ldflags options. Backslashes should not be used in |
| 226 | forward slashes must be used in paths passed to the compiler and | 226 | file names passed to the compiler and linker via these options. Use |
| 227 | linker via the --cflags and --ldflags options, and that it is | 227 | forward slashes instead. If the arguments to these two options |
| 228 | currently not possible to pass a macro like -DFOO=BAR (though -DFOO | 228 | include the `=' character, like when passing a -DFOO=bar preprocessor |
| 229 | is perfectly valid). | 229 | option, the argument with the `=' character should be enclosed in |
| 230 | quotes, like this: | ||
| 231 | |||
| 232 | configure --cflags "-DFOO=bar" | ||
| 233 | |||
| 234 | Support for options that include the `=' character require "command | ||
| 235 | extensions" to be enabled. (They are enabled by default, but your | ||
| 236 | system administrator could have changed that. See "cmd /?" for | ||
| 237 | details.) If command extensions are disabled, a warning message might | ||
| 238 | be displayed informing you that "using parameters that include the = | ||
| 239 | character by enclosing them in quotes will not be supported." | ||
| 230 | 240 | ||
| 231 | N.B. It is normal to see a few error messages output while configure | 241 | N.B. It is normal to see a few error messages output while configure |
| 232 | is running, when gcc support is being tested. These cannot be | 242 | is running, when gcc support is being tested. These cannot be |
diff --git a/nt/configure.bat b/nt/configure.bat index 1450650304d..699a33bc2eb 100755 --- a/nt/configure.bat +++ b/nt/configure.bat | |||
| @@ -75,6 +75,19 @@ goto end | |||
| 75 | 75 | ||
| 76 | :start | 76 | :start |
| 77 | rem ---------------------------------------------------------------------- | 77 | rem ---------------------------------------------------------------------- |
| 78 | rem Attempt to enable command extensions. Set use_extensions to 1 if | ||
| 79 | rem they are available and 0 if they are not available. | ||
| 80 | set use_extensions=1 | ||
| 81 | setlocal ENABLEEXTENSIONS | ||
| 82 | if "%CMDEXTVERSION%" == "" set use_extensions=0 | ||
| 83 | if "%use_extensions%" == "1" goto afterext | ||
| 84 | |||
| 85 | echo. Command extensions are not available. Using parameters that include the = | ||
| 86 | echo. character by enclosing them in quotes will not be supported. | ||
| 87 | |||
| 88 | :afterext | ||
| 89 | |||
| 90 | rem ---------------------------------------------------------------------- | ||
| 78 | rem Default settings. | 91 | rem Default settings. |
| 79 | set prefix= | 92 | set prefix= |
| 80 | set nodebug=N | 93 | set nodebug=N |
| @@ -136,6 +149,20 @@ echo. --without-tiff do not use TIFF library even if it is installed | |||
| 136 | echo. --without-xpm do not use XPM library even if it is installed | 149 | echo. --without-xpm do not use XPM library even if it is installed |
| 137 | echo. --with-svg use the RSVG library (experimental) | 150 | echo. --with-svg use the RSVG library (experimental) |
| 138 | echo. --distfiles path to files for make dist, e.g. libXpm.dll | 151 | echo. --distfiles path to files for make dist, e.g. libXpm.dll |
| 152 | if "%use_extensions%" == "0" goto end | ||
| 153 | echo. | ||
| 154 | echo. The cflags and ldflags arguments support parameters that include the = | ||
| 155 | echo. character. However, since the = character is normally treated as a | ||
| 156 | echo. separator character you will need to enclose any parameter that includes | ||
| 157 | echo. the = character in quotes. For example, to include | ||
| 158 | echo. -DSITELOAD_PURESIZE_EXTRA=100000 as one of the cflags you would run | ||
| 159 | echo. configure.bat as follows: | ||
| 160 | echo. configure.bat --cflags "-DSITELOAD_PURESIZE_EXTRA=100000" | ||
| 161 | echo. | ||
| 162 | echo. Note that this capability of processing parameters that include the = | ||
| 163 | echo. character depends on command extensions. This batch file attempts to | ||
| 164 | echo. enable command extensions. If command extensions cannot be enabled, a | ||
| 165 | echo. warning message will be displayed. | ||
| 139 | goto end | 166 | goto end |
| 140 | 167 | ||
| 141 | rem ---------------------------------------------------------------------- | 168 | rem ---------------------------------------------------------------------- |
| @@ -198,6 +225,17 @@ goto again | |||
| 198 | rem ---------------------------------------------------------------------- | 225 | rem ---------------------------------------------------------------------- |
| 199 | 226 | ||
| 200 | :usercflags | 227 | :usercflags |
| 228 | if "%use_extensions%" == "1" goto ucflagex | ||
| 229 | goto ucflagne | ||
| 230 | |||
| 231 | :ucflagex | ||
| 232 | shift | ||
| 233 | set usercflags=%usercflags%%sep1%%~1 | ||
| 234 | set sep1= %nothing% | ||
| 235 | shift | ||
| 236 | goto again | ||
| 237 | |||
| 238 | :ucflagne | ||
| 201 | shift | 239 | shift |
| 202 | set usercflags=%usercflags%%sep1%%1 | 240 | set usercflags=%usercflags%%sep1%%1 |
| 203 | set sep1= %nothing% | 241 | set sep1= %nothing% |
| @@ -207,6 +245,17 @@ goto again | |||
| 207 | rem ---------------------------------------------------------------------- | 245 | rem ---------------------------------------------------------------------- |
| 208 | 246 | ||
| 209 | :userldflags | 247 | :userldflags |
| 248 | if "%use_extensions%" == "1" goto ulflagex | ||
| 249 | goto ulflagne | ||
| 250 | |||
| 251 | :ulflagex | ||
| 252 | shift | ||
| 253 | set userldflags=%userldflags%%sep2%%~1 | ||
| 254 | set sep2= %nothing% | ||
| 255 | shift | ||
| 256 | goto again | ||
| 257 | |||
| 258 | :ulflagne | ||
| 210 | shift | 259 | shift |
| 211 | set userldflags=%userldflags%%sep2%%1 | 260 | set userldflags=%userldflags%%sep2%%1 |
| 212 | set sep2= %nothing% | 261 | set sep2= %nothing% |