On 1/18/22 04:41, Juan José Santamaría Flecha wrote:
> In [1] capacity for $SUBJECT was added to most of the batch scripts,
> but clean.bat was not included. I propose to do so with the attached
> patch.


That looks a bit ugly. How about this (untested) instead?


>
> By the way, are pgbison.bat and pgflex.bat directly called anywhere?



Not to my knowledge. One of the things that's annoying about them is
that the processor names are hardcoded, so if you install winflexbison
as I usually do you have to rename the executables (or rename the
chocolatey shims) or the scripts won't work.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com
diff --git a/src/tools/msvc/clean.bat b/src/tools/msvc/clean.bat
index 0cc91e7d6c..42b3d1b87f 100755
--- a/src/tools/msvc/clean.bat
+++ b/src/tools/msvc/clean.bat
@@ -4,8 +4,9 @@ REM src/tools/msvc/clean.bat
 set DIST=0
 if "%1"=="dist" set DIST=1
 
-set D=%CD%
-if exist ..\msvc if exist ..\..\..\src cd ..\..\..
+setlocal
+
+cd "%~dp0\..\..\.."
 
 if exist debug rd /s /q debug
 if exist release rd /s /q release
@@ -133,7 +134,7 @@ REM Clean up datafiles built with contrib
 REM cd contrib
 REM for /r %%f in (*.sql) do if exist %%f.in del %%f
 
-cd %D%
+cd "%~dp0"
 
 REM Clean up ecpg regression test files
 msbuild ecpg_regression.proj /NoLogo /v:q %MSBFLAGS% /t:clean

Reply via email to