Re: headerscheck ccache support - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: headerscheck ccache support
Date
Msg-id 8ef4f92b-2ba3-4ccb-b437-e66b8f611c58@eisentraut.org
Whole thread Raw
In response to Re: headerscheck ccache support  (Álvaro Herrera <alvherre@kurilemu.de>)
List pgsql-hackers
On 28.11.25 15:16, Álvaro Herrera wrote:
> On 2025-Nov-28, Peter Eisentraut wrote:
> 
>> But this doesn't seem to buy very much.  The overhead of the shell script to
>> write out the test files appears to become significant compared the the
>> actual compile commands.
> 
> If you wanted to save some shell execution time, you could move the `tr`
> calls to the bottom of the loop to avoid doing it for files that the
> `if` block is going to discard.  But is that significant?  I doubt it.

This actually made a measurable difference, so I included that change in 
the committed patch.

> (I didn't quite understand why you use printf instead of echo, given
> that both are shell builtins in any case.)

printf is nowadays preferable over echo in portable shell scripts.  See 
for example

https://cgit.git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS#n435

and

https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/html_node/Limitations-of-Builtins.html



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: headerscheck ccache support
Next
From: Álvaro Herrera
Date:
Subject: Re: Cleanup shadows variable warnings, round 1