Re: Use "?=" operator for a contrib makefile in documentation

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Use "?=" operator for a contrib makefile in documentation
Дата
Msg-id 3409f2f0-6a9a-4848-bbc8-c520714c9446@eisentraut.org
обсуждение исходный текст
Ответ на Re: Use "?=" operator for a contrib makefile in documentation  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 29.09.25 16:00, Tom Lane wrote:
> Peter Eisentraut <peter@eisentraut.org> writes:
>> On 25.09.25 15:17, Maxim Orlov wrote:
>>> I think that the Makefile should be written so that variable values,
>>> specifically, PG_CONFIG, can be given to it from the environment rather
>>> than the make command line. As a result, using the "?=" operator rather
>>> than "=" to set a default value to the PG_CONFIG variable appears more
>>> acceptable.
> 
>> I think the current text is preferable.  This allows running
>> make PG_CONFIG=...
>> so that you can pick a different PostgreSQL installation for a
>> particular build.
> 
> AFAICT that would still work with ?=.  Nonetheless, I agree with
> Peter that we shouldn't change this advice (much less change all our
> Makefiles that do it like that).  The reason is that the gmake manual
> advises caution in the use of this feature:

Yes, that's what I meant.  The current code allows the "postfix" make 
syntax (make PG_CONFIG=...), but it doesn't allow environment variables 
to take effect silently (which also prevents the "prefix" syntax 
(PG_CONFIG=... make), but that's just the way things work).




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