diff options
author | Ben Key <bkey76@gmail.com> | 2011-04-15 17:48:00 -0500 |
---|---|---|
committer | Ben Key <bkey76@gmail.com> | 2011-04-15 17:48:00 -0500 |
commit | 4a1a6b5b7d2208cf504cf38e548d3c562f6cfbb3 (patch) | |
tree | eb9b18d15d8b7b6b4ecc961ff8bd0495ffebfb54 /nt/configure.bat | |
parent | ba3bd5b6c3771010fa37ec48170eee8323b55bf1 (diff) | |
download | emacs-4a1a6b5b7d2208cf504cf38e548d3c562f6cfbb3.tar.gz |
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.
Diffstat (limited to 'nt/configure.bat')
-rwxr-xr-x | nt/configure.bat | 49 |
1 files changed, 49 insertions, 0 deletions
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 :start
rem ----------------------------------------------------------------------
+rem Attempt to enable command extensions. Set use_extensions to 1 if
+rem they are available and 0 if they are not available.
+set use_extensions=1
+setlocal ENABLEEXTENSIONS
+if "%CMDEXTVERSION%" == "" set use_extensions=0
+if "%use_extensions%" == "1" goto afterext
+
+echo. Command extensions are not available. Using parameters that include the =
+echo. character by enclosing them in quotes will not be supported.
+
+:afterext
+
+rem ----------------------------------------------------------------------
rem Default settings.
set prefix=
set nodebug=N
@@ -136,6 +149,20 @@ echo. --without-tiff do not use TIFF library even if it is installed echo. --without-xpm do not use XPM library even if it is installed
echo. --with-svg use the RSVG library (experimental)
echo. --distfiles path to files for make dist, e.g. libXpm.dll
+if "%use_extensions%" == "0" goto end
+echo.
+echo. The cflags and ldflags arguments support parameters that include the =
+echo. character. However, since the = character is normally treated as a
+echo. separator character you will need to enclose any parameter that includes
+echo. the = character in quotes. For example, to include
+echo. -DSITELOAD_PURESIZE_EXTRA=100000 as one of the cflags you would run
+echo. configure.bat as follows:
+echo. configure.bat --cflags "-DSITELOAD_PURESIZE_EXTRA=100000"
+echo.
+echo. Note that this capability of processing parameters that include the =
+echo. character depends on command extensions. This batch file attempts to
+echo. enable command extensions. If command extensions cannot be enabled, a
+echo. warning message will be displayed.
goto end
rem ----------------------------------------------------------------------
@@ -198,6 +225,17 @@ goto again rem ----------------------------------------------------------------------
:usercflags
+if "%use_extensions%" == "1" goto ucflagex
+goto ucflagne
+
+:ucflagex
+shift
+set usercflags=%usercflags%%sep1%%~1
+set sep1= %nothing%
+shift
+goto again
+
+:ucflagne
shift
set usercflags=%usercflags%%sep1%%1
set sep1= %nothing%
@@ -207,6 +245,17 @@ goto again rem ----------------------------------------------------------------------
:userldflags
+if "%use_extensions%" == "1" goto ulflagex
+goto ulflagne
+
+:ulflagex
+shift
+set userldflags=%userldflags%%sep2%%~1
+set sep2= %nothing%
+shift
+goto again
+
+:ulflagne
shift
set userldflags=%userldflags%%sep2%%1
set sep2= %nothing%
|