Re: [PATCH] allow src/tools/msvc/*.bat files to be called from the root of the source tree

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: [PATCH] allow src/tools/msvc/*.bat files to be called from the root of the source tree
Дата
Msg-id 4cdff013-a61e-c6c5-ece9-a403d986c930@dunslane.net
обсуждение исходный текст
Ответ на [PATCH] allow src/tools/msvc/*.bat files to be called from the root of the source tree  (Anton Voloshin <a.voloshin@postgrespro.ru>)
Ответы Re: [PATCH] allow src/tools/msvc/*.bat files to be called from the root of the source tree
Список pgsql-hackers
On 12/29/21 05:16, Anton Voloshin wrote:
> Hello,
>
> currently, on Windows/MSVC, src\tools\msvc\*.bat files mostly require
> being in that src\tools\msvc directory first.
>
> I suggest an obvious fix:
[...]

> This patch uses standard windows cmd's %~dp0 to get the complete path
> (drive, "d", and path, "p") of the currently executing .bat file to
> get proper path of a .pl file to execute. I find the following link
> useful whenever I need to remember details on cmd's %-substitution
> rules: https://ss64.com/nt/syntax-args.html
>
> With this change, one can call those .bat files, e.g.
> src\tools\msvc\build.bat, without leaving the root of the source tree.
>
> Not sure if similar change should be applied to pgflex.bat and
> pgbison.bat -- never used them on Windows and they seem to require
> being called from the root, but perhaps they deserve a similar change.
>
> If accepted, do you think this change is worthy of back-porting?
>
> Please advise if you think this change is a beneficial one.
>
> P.S. Yes, I am aware of very probable upcoming move to meson, but
> until then this little patch really helps me whenever I have to deal
> with Windows and MSVC from the command line. Besides, it could help
> old branches as well.
>


Seems reasonable. I don't see any reason not to do it for pgbison.bat
and pgflex.bat, just for the sake of consistency.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: pg_archivecleanup - add the ability to detect, archive and delete the unneeded wal files on the primary
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Foreign key joins revisited