[PATCH v2] Allow adding arbitrary code to benchmark tests
Siddhesh Poyarekar
siddhesh@redhat.com
Wed Mar 20 12:08:00 GMT 2013
On Wed, Mar 20, 2013 at 11:40:24AM +0100, Andreas Schwab wrote:
> Please use an atomic update method for the target.
>
OK, here's v2.
Siddhesh
* Rules ($(objpfx)bench-%.c): Include code from a C source
file.
diff --git a/Rules b/Rules
index bc5dacd..15b79cf 100644
--- a/Rules
+++ b/Rules
@@ -210,8 +210,11 @@ $(binaries-bench): %: %.o \
$(+link)
$(objpfx)bench-%.c: %-inputs bench-skeleton.c
+ (if [ -n "$($*-INCLUDE)" ]; then \
+ cat $($*-INCLUDE); \
+ fi && \
$(..)scripts/bench.pl $(patsubst %-inputs,%,$<) \
- $($*-ITER) $($*-ARGLIST) $($*-RET) > $@
+ $($*-ITER) $($*-ARGLIST) $($*-RET)) > $@
.PHONY: distclean realclean subdir_distclean subdir_realclean \
More information about the Libc-alpha
mailing list