This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH v2.1] Rebuild benchmark sources when Makefile is updated
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 12 Apr 2013 18:09:55 +0530
- Subject: [PATCH v2.1] Rebuild benchmark sources when Makefile is updated
- References: <20130403080526 dot GA20842 at spoyarek dot pnq dot redhat dot com> <20130408220956 dot 124492C09F at topped-with-meat dot com> <20130409044856 dot GE15689 at spoyarek dot pnq dot redhat dot com>
Hi,
Here's this patch again, now based on latest master. This forces
rebuild of benchmark tests whenever the Makefile is modified, so that
changes to benchmark parameters are reflected. OK to commit?
Siddhesh
* benchtests/Rules (bench-deps): Collect dependencies into a
single variable. Add Makefile to dependencies.
($(objpfx)bench-%.c): Depend on bench-deps.
diff --git a/benchtests/Makefile b/benchtests/Makefile
index 86d5905..3e794d7 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -114,6 +114,8 @@ include ../Rules
binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
+bench-deps := bench-skeleton.c Makefile
+
run-bench = $(test-wrapper-env) \
GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
$($*-ENV) $(rtld-prefix) $${run}
@@ -133,7 +135,7 @@ $(binaries-bench): %: %.o \
$(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
$(+link)
-$(objpfx)bench-%.c: %-inputs bench-skeleton.c
+$(objpfx)bench-%.c: %-inputs $(bench-deps)
{ if [ -n "$($*-INCLUDE)" ]; then \
cat $($*-INCLUDE); \
fi; \