[squid-dev] [PATCH] Do not update gperf-generated files through make

Alex Rousskov rousskov at measurement-factory.com
Mon Sep 21 16:40:10 UTC 2015


On 09/21/2015 10:24 AM, Kinkie wrote:

>    since we include the gperf-generated files in the source
> distribution, it doesn't really make sense to build them through Make
> - depending on the relative timestamps of the .cci and .gperf files at
> checkout, some systems may decide to rebuild the .cci file.
> The side effect of such a rebuild are a greatly lengthened build time
> - if we want to have a perfect hash we need to try many hash functions
> - for no benefit at all.
> This also highlighted a gmake-ism in the Makefile.am which recently
> caused some failed builds on FreeBSD 9.3.
> 
> The attached patch removes the Makefile.am dependency of the .cci
> file, and replaces it with a comment in the .gperf file; we want to
> rerun gperf only when touching the .gperf file and that's expected to
> be a very rare event.


I agree that the default Squid build should not rely on gperf presence
or depend on RegisteredHeadersHash.cci timestamp.

It would be better to have a dedicated make target (unused by "make
all") that would rebuild all gperf-related file(s), but if that is
difficult to add, we can live with a comment IMHO. If we go the comment
route, I recommend leaving commented-out rules in the Makefile and s/to
regenerate:/to generate RegisteredHeadersHash.cci:/ in
RegisteredHeadersHash.gperf.


Thank you,

Alex.



More information about the squid-dev mailing list