]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Make hdrtest ccache-friendly (#2466) master
authorFrancesco Chemolli <5175948+kinkie@users.noreply.github.com>
Sun, 9 Aug 2026 20:34:01 +0000 (20:34 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sun, 9 Aug 2026 20:34:11 +0000 (20:34 +0000)
The solution implemented in commit ca4ed647e71
makes the testHeaders process unfriendly to ccache,
because the sources for testheaders are not hermetic.

Change how hdrtest filenames are derived so that they
are unique and reproducible across "make" runs.

src/TestHeaders.am

index 40b8fddd5279700868f3dfe6aefe3bc116d144d4..f4e128ed98a823792bcafb5f3f5b9bc10078de39 100644 (file)
@@ -20,7 +20,7 @@ testHeaders: $(SOURCES) $(noinst_HEADERS) $(EXTRA_DIST) $(top_srcdir)/test-suite
 .h.hdrtest:
        @SrcFilePath=`echo $< | $(SED) 's%^$(top_srcdir)/%%'`; \
        SrcFileName=`basename $$SrcFilePath`; \
-       TargetFileName=tmp$$$$-`basename $@`; \
+       TargetFileName="`dirname $$SrcFilePath | $(SED) 's!/!-!g'`-`basename $@`"; \
        if test "$(EXCLUDE_FROM_HDR_TESTING)" != "" && echo "$(EXCLUDE_FROM_HDR_TESTING)" | $(TR) ' ' '\n' | $(FGREP) -x -q "$$SrcFileName" ; then \
                echo "header-test: skip - $$SrcFilePath"; \
                exit 0; \