]> git.feebdaed.xyz Git - 0xmirror/curl.git/commitdiff
lib: create unitprotos.h in the builddir, not srcdir
authorDan Fandrich <dan@coneharvesters.com>
Tue, 16 Dec 2025 07:32:59 +0000 (23:32 -0800)
committerDan Fandrich <dan@coneharvesters.com>
Tue, 16 Dec 2025 17:51:06 +0000 (09:51 -0800)
The make rule confused automake by changing directories before creating
the file, causing unitprotos.h to be created in the srcdir instead of
the builddir. This results in a stale file and confusing compile errors
in out-of-tree builds.

Fixes #19966
Closes #19993

lib/Makefile.am

index 2645872ebf77693ce6bf6782af71f373408abd97..813b2224eb449ff9f645d69b0c3c9a5ee480d6a8 100644 (file)
@@ -165,7 +165,7 @@ UNITV_ = $(UNITV_0)
 
 # UNITPROTOS depends on every C file in the lib/ dir
 $(UNITPROTOS): $(CSOURCES)
-       $(UNIT_V)(cd $(srcdir) && @PERL@ ../scripts/extract-unit-protos $(CSOURCES) > $(top_builddir)/lib/$(UNITPROTOS))
+       $(UNIT_V)(cd $(srcdir) && @PERL@ ../scripts/extract-unit-protos $(CSOURCES)) > $(top_builddir)/lib/$(UNITPROTOS)
 
 # disable the tests that are mostly causing false positives
 TIDYFLAGS := -checks=-clang-analyzer-security.insecureAPI.bzero,-clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-optin.performance.Padding,-clang-analyzer-security.ArrayBound,-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling -quiet