This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v2] Allow adding arbitrary code to benchmark tests


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 \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]