summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <[email protected]>2024-03-01 11:45:10 +0100
committerJoerg Bornemann <[email protected]>2024-03-05 11:56:24 +0100
commit073185ad2e29e565bc9f804dc8c1d278121020d6 (patch)
tree61900a8f3dccafa7fb4a1270c7e767fbdb8aa7f3
parent477587651109a4d7875b3f008b94e15376556b7d (diff)
configure.bat: Fix errors on Windows
Since the last change to configure.bat we got two of these errors, regardless of the arguments passed to configure: The system cannot find the drive specified. This is due to the quirky semantics of the :: commenting style that's used within an if block. Lines starting with :: might be interpreted as starting with a drive letter. Switch to rem for comments to avoid such behavior. Note that we have to quote the comments, because rem https://www.example.com/?foo=bar will split the command at the equal sign and complain about 'unexpected bar'. Mind-boggling trivia: rem https://www.example.com/?something_without_equal will display the help text for the REM built-in, because /? is somewhere in the string. Change-Id: I2ffcc6bd4312d24bdde2b7f1e336f827f503e491 Reviewed-by: Alexandru Croitor <[email protected]>
-rw-r--r--configure.bat10
1 files changed, 5 insertions, 5 deletions
diff --git a/configure.bat b/configure.bat
index 972f16594c3..0c22fdccca3 100644
--- a/configure.bat
+++ b/configure.bat
@@ -83,11 +83,11 @@ set REDO_FILE_PATH=%TOPQTDIR%\config.redo.last
set REDO_TMP_FILE_PATH=%TOPQTDIR%\config.redo.in
set FRESH_REQUESTED_ARG=
if not defined redoing (
- :: The '.' in 'echo.%*' ensures we don't print "echo is off" when no arguments are passed
- :: https://devblogs.microsoft.com/oldnewthing/20170802-00/?p=96735
- :: The space before the '>' makes sure that when we have a digit at the end of the args, we
- :: don't accidentally concatenate it with the '>' resulting in '0>' or '2>' which redirects
- :: into the file from a stream different than stdout, leading to broken or empty content.
+ rem "The '.' in 'echo.%*' ensures we don't print "echo is off" when no arguments are passed"
+ rem "https://devblogs.microsoft.com/oldnewthing/20170802-00/?p=96735"
+ rem "The space before the '>' makes sure that when we have a digit at the end of the args, we"
+ rem "don't accidentally concatenate it with the '>' resulting in '0>' or '2>' which redirects"
+ rem "into the file from a stream different than stdout, leading to broken or empty content."
echo.%* >"%OPT_TMP_FILE_PATH%"
cmake -DIN_FILE="%OPT_TMP_FILE_PATH%" -DOUT_FILE="%OPT_FILE_PATH%" -DIGNORE_ARGS=-top-level -P "%QTSRC%\cmake\QtWriteArgsFile.cmake"