[glibc/release/2.44/master] benchtests: Create objdir in the bench-%.c generation rule

Sam James via Glibc-cvs <[email protected]>
Newsgroups gmane.comp.lib.glibc.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=26b9cc42a051f78233fcecd2a3b83f98ec9862b9

commit 26b9cc42a051f78233fcecd2a3b83f98ec9862b9
Author: Adhemerval Zanella <[email protected]>
Date:   Tue Jul 28 11:27:33 2026 -0300

    benchtests: Create objdir in the bench-%.c generation rule
    
    The $(objpfx)bench-%.c rule writes its output into $(objpfx) without
    ensuring that directory exists.  Serial builds happened to satisfy
    that ordering, with parallel builds the generation recipe can
    run before the directory is created, failing with:
    
      cannot create .../benchtests/bench-xxx.c-tmp: Directory nonexistent
    
    Add the standard $(make-target-directory).
    
    Reviewed-by: Florian Weimer <[email protected]>
    (cherry picked from commit 26f0f2aa7d6ea63f85b5186349c41de2c91b4dd7)

Diff:
---
 benchtests/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/benchtests/Makefile b/benchtests/Makefile
index f407e492cb..16cc951d19 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -622,6 +622,7 @@ $(bench-link-targets): %: %.o $(objpfx)json-lib.o \
 $(bench-link-targets): LDFLAGS += $(link-bench-bind-now)
 
 $(objpfx)bench-%.c: %-inputs $(bench-deps)
+	$(make-target-directory)
 	{ if [ -n "$($*-INCLUDE)" ]; then \
 	  cat $($*-INCLUDE); \
 	fi; \
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.