aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2022-01-07 16:07:45 -0500
committerAndrew Dunstan <andrew@dunslane.net>2022-01-07 16:14:23 -0500
commita4cde9153b6efd9f1649daaa5d0caf8d3807e64d (patch)
tree29f33f45efc20280f02871ac17aa612b9b79eac4 /src
parentccc7c3ad86b67cd85805824d40782fa5b92b1fc5 (diff)
downloadpostgresql-a4cde9153b6efd9f1649daaa5d0caf8d3807e64d.tar.gz
postgresql-a4cde9153b6efd9f1649daaa5d0caf8d3807e64d.zip
Allow MSVC .bat wrappers to be called from anywhere
Instead of using a hardcoded or default path to the perl file the .bat file is a wrapper for, we use a path that means the file is found in the same directory as the .bat file. Patch by Anton Voloshin, slightly tweaked by me. Backpatch to all live branches Discussion: https://postgr.es/m/2b7a674b-5fb0-d264-75ef-ecc7a31e54f8@postgrespro.ru
Diffstat (limited to 'src')
-rwxr-xr-xsrc/tools/msvc/build.bat2
-rw-r--r--src/tools/msvc/install.bat2
-rwxr-xr-xsrc/tools/msvc/pgbison.bat2
-rwxr-xr-xsrc/tools/msvc/pgflex.bat2
-rw-r--r--src/tools/msvc/vcregress.bat2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/msvc/build.bat b/src/tools/msvc/build.bat
index 4001ac1d0d1..171f7498e2f 100755
--- a/src/tools/msvc/build.bat
+++ b/src/tools/msvc/build.bat
@@ -3,4 +3,4 @@ REM src/tools/msvc/build.bat
REM all the logic for this now belongs in build.pl. This file really
REM only exists so you don't have to type "perl build.pl"
REM Resist any temptation to add any logic here.
-@perl build.pl %*
+@perl %~dp0/build.pl %*
diff --git a/src/tools/msvc/install.bat b/src/tools/msvc/install.bat
index d03277eff2b..d02b80826b7 100644
--- a/src/tools/msvc/install.bat
+++ b/src/tools/msvc/install.bat
@@ -3,4 +3,4 @@ REM src/tools/msvc/install.bat
REM all the logic for this now belongs in install.pl. This file really
REM only exists so you don't have to type "perl install.pl"
REM Resist any temptation to add any logic here.
-@perl install.pl %*
+@perl %~dp0/install.pl %*
diff --git a/src/tools/msvc/pgbison.bat b/src/tools/msvc/pgbison.bat
index d976750c9c7..dc8ac4a2cf2 100755
--- a/src/tools/msvc/pgbison.bat
+++ b/src/tools/msvc/pgbison.bat
@@ -4,4 +4,4 @@ REM src/tools/msvc/pgbison.bat
REM all the logic for this now belongs in pgbison.pl. This file really
REM only exists so you don't have to type "perl src/tools/msvc/pgbison.pl"
REM Resist any temptation to add any logic here.
-@perl src/tools/msvc/pgbison.pl %*
+@perl %~dp0/pgbison.pl %*
diff --git a/src/tools/msvc/pgflex.bat b/src/tools/msvc/pgflex.bat
index 3c7afe9c317..f20834ba9b1 100755
--- a/src/tools/msvc/pgflex.bat
+++ b/src/tools/msvc/pgflex.bat
@@ -4,4 +4,4 @@ REM src/tools/msvc/pgflex.bat
REM all the logic for this now belongs in pgflex.pl. This file really
REM only exists so you don't have to type "perl src/tools/msvc/pgflex.pl"
REM Resist any temptation to add any logic here.
-@perl src/tools/msvc/pgflex.pl %*
+@perl %~dp0/pgflex.pl %*
diff --git a/src/tools/msvc/vcregress.bat b/src/tools/msvc/vcregress.bat
index a981d3a6aa1..7fba45c1e77 100644
--- a/src/tools/msvc/vcregress.bat
+++ b/src/tools/msvc/vcregress.bat
@@ -3,4 +3,4 @@ REM src/tools/msvc/vcregress.bat
REM all the logic for this now belongs in vcregress.pl. This file really
REM only exists so you don't have to type "perl vcregress.pl"
REM Resist any temptation to add any logic here.
-@perl vcregress.pl %*
+@perl %~dp0/vcregress.pl %*