This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH v3] 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 19:18:07 +0530
- Subject: [PATCH v3] 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> <20130320120901 dot GY25837 at spoyarek dot pnq dot redhat dot com> <mvmppyui52l dot fsf at hawking dot suse dot de>
On Wed, Mar 20, 2013 at 02:17:06PM +0100, Andreas Schwab wrote:
> There is no need to use a subshell, braces are enough.
>
Here's v3 then. Looks OK?
Siddhesh
diff --git a/Rules b/Rules
index bc5dacd..ab9ae9b 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 \