Commit a7772e87 authored by Andrew Dunstan's avatar Andrew Dunstan

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
parent f285d958
...@@ -3,4 +3,4 @@ REM 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 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 only exists so you don't have to type "perl build.pl"
REM Resist any temptation to add any logic here. REM Resist any temptation to add any logic here.
@perl build.pl %* @perl %~dp0/build.pl %*
...@@ -3,4 +3,4 @@ REM 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 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 only exists so you don't have to type "perl install.pl"
REM Resist any temptation to add any logic here. REM Resist any temptation to add any logic here.
@perl install.pl %* @perl %~dp0/install.pl %*
...@@ -4,4 +4,4 @@ REM 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 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 only exists so you don't have to type "perl src/tools/msvc/pgbison.pl"
REM Resist any temptation to add any logic here. REM Resist any temptation to add any logic here.
@perl src/tools/msvc/pgbison.pl %* @perl %~dp0/pgbison.pl %*
...@@ -4,4 +4,4 @@ REM 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 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 only exists so you don't have to type "perl src/tools/msvc/pgflex.pl"
REM Resist any temptation to add any logic here. REM Resist any temptation to add any logic here.
@perl src/tools/msvc/pgflex.pl %* @perl %~dp0/pgflex.pl %*
...@@ -3,4 +3,4 @@ REM 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 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 only exists so you don't have to type "perl vcregress.pl"
REM Resist any temptation to add any logic here. REM Resist any temptation to add any logic here.
@perl vcregress.pl %* @perl %~dp0/vcregress.pl %*
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment