This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH v2] Allow adding arbitrary code to benchmark tests
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 20 Mar 2013 17:39:01 +0530
- Subject: [PATCH v2] Allow adding arbitrary code to benchmark tests
- References: <20130320103133 dot GW25837 at spoyarek dot pnq dot redhat dot com> <mvmtxo6icbr dot fsf at hawking dot suse dot de>
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 \