]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
winbuild: MS-DOS batch tidy-ups
authorViktor Szakats <commit@vsz.me>
Tue, 2 Jul 2024 08:41:35 +0000 (10:41 +0200)
committerViktor Szakats <commit@vsz.me>
Tue, 2 Jul 2024 17:26:15 +0000 (19:26 +0200)
- prefer `.bat` extension over `.cmd` for MS-DOS batch, which also
  avoids confusion with OS/400 `.cmd` files.
- cleanup `echo` quotes, drop them consistently.
- delete empty output line from one of the error branches.
- prefer lowercase commands like the rest of MS-DOS batches.
- delete a contraction.
- drop backticks from error message.
- use `nmake.exe` consistently.
- use equal/not-equal operator style consistently.
- inline a single-line `if` branch.
- delete exceptions and rules dealing with Windows `.cmd` extension.

Closes #14084

.gitattributes
.github/scripts/spacecheck.pl
Makefile.am
packages/OS400/.gitattributes [deleted file]
winbuild/makedebug.bat [moved from winbuild/makedebug.cmd with 81% similarity]

index d4f08a9e589b47458d67ea3f6e93659af416585f..41a5aff8dcbc498e0359423bd7cb29d061aaf2cd 100644 (file)
@@ -10,7 +10,6 @@ configure.ac eol=lf
 *.sh eol=lf
 *.[ch] whitespace=tab-in-indent
 
-# Batch files (bat,cmd) must be run with CRLF line endings.
+# Batch files must be run with CRLF line endings.
 # Refer to https://github.com/curl/curl/pull/6442
 *.bat text eol=crlf
-*.cmd text eol=crlf
index 36847730f564939dd1f69a6195b19e9c5c30289d..b2473b1544144a14a547549ec48ed57e6b689da3 100755 (executable)
@@ -30,7 +30,7 @@ my @tabs = (
     "^m4/zz40-xc-ovr.m4",
     "Makefile\\.[a-z]+\$",
     "/mkfile",
-    "\\.(bat|cmd|sln|vc)\$",
+    "\\.(bat|sln|vc)\$",
     "^tests/certs/.+\\.der\$",
     "^tests/data/test",
 );
@@ -43,7 +43,7 @@ my @mixed_eol = (
 
 my @need_crlf = (
     "\\.(bat|sln)\$",
-    "^winbuild/.+\\.(cmd|md)\$",
+    "^winbuild/.+\\.md\$",
 );
 
 my @space_at_eol = (
index ad8651c77c866fa1ce37678a377abe99a4cad462..6d604ea89966dba51a55a0a3586c290692fff897 100644 (file)
@@ -62,7 +62,7 @@ VC_DIST = projects/README.md                           \
  projects/wolfssl_override.props
 
 WINBUILD_DIST = winbuild/README.md winbuild/gen_resp_file.bat \
- winbuild/MakefileBuild.vc winbuild/Makefile.vc winbuild/makedebug.cmd
+ winbuild/MakefileBuild.vc winbuild/Makefile.vc winbuild/makedebug.bat
 
 PLAN9_DIST = plan9/include/mkfile \
  plan9/include/mkfile             \
diff --git a/packages/OS400/.gitattributes b/packages/OS400/.gitattributes
deleted file mode 100644 (file)
index e9b8201..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
-#
-# SPDX-License-Identifier: curl
-
-# OS400 .cmd files are not windows scripts.
-*.cmd text eol=auto
similarity index 81%
rename from winbuild/makedebug.cmd
rename to winbuild/makedebug.bat
index 3f523c82f92f229c0349cee3fbbdb428120565db..e86e668ca0fb9f0cb833848dbb9092a7512d96c9 100644 (file)
@@ -25,12 +25,9 @@ rem ***************************************************************************
 
 where.exe nmake.exe >nul 2>&1
 
-IF %ERRORLEVEL% == 1 (
-  ECHO Error: Can't find `nmake.exe` - be sure to run this script from within a Developer Command-Prompt
-  ECHO.
-) ELSE (
-  nmake /f Makefile.vc mode=static DEBUG=yes GEN_PDB=yes
-  IF %ERRORLEVEL% NEQ 0 (
-    ECHO "Error: Build Failed"
-  )
+if %ERRORLEVEL% EQU 1 (
+  echo Error: Cannot find nmake.exe - be sure to run this script from within a Developer Command-Prompt
+) else (
+  nmake.exe /f Makefile.vc mode=static DEBUG=yes GEN_PDB=yes
+  if %ERRORLEVEL% NEQ 0 echo Error: Build Failed
 )