]> sourceware.org Git - glibc.git/commitdiff
New make target to only build benchmark binaries
authorSiddhesh Poyarekar <sid@reserved-bit.com>
Wed, 20 Apr 2016 04:53:28 +0000 (10:23 +0530)
committerSiddhesh Poyarekar <sid@reserved-bit.com>
Wed, 20 Apr 2016 04:53:28 +0000 (10:23 +0530)
For situations where we are cross-building or where we want to avoid
building on the target system, we want a way to only build benchmarks
and then copy them over to the target system to run them.  I have also
added a simple enhancement for the 'bench' target where all benchmark
binaries are built and then the benchmarks executed.

Tested on arm.

Makefile.in (bench-build): New target.
Rules (PHONY): Add bench-build target.
benchtests/Makefile (bench): Depend on bench-build.
(bench-build): New target.

ChangeLog
Makefile.in
Rules
benchtests/Makefile

index faa1e6396a03348e9cd9fe768ce5948d525c7a34..a87a0b2b1ad1d76be03a2dd5da80e15ee1863d98 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-04-20  Siddhesh Poyarekar  <sid@reserved-bit.com>
+
+       Makefile.in (bench-build): New target.
+       Rules (PHONY): Add bench-build target.
+       benchtests/Makefile (bench): Depend on bench-build.
+       (bench-build): New target.
+
 2016-04-19  Samuel Thibault  <samuel.thibault@ens-lyon.org>
 
        * sysdeps/mach/hurd/profil.c (update_waiter): Initialize
index 710ce7e2c22991e9d5a1829d1d33da92e77d2cd3..3fe9e736458f816bb46956f4bc7192c351fa1d2e 100644 (file)
@@ -12,7 +12,7 @@ install:
        LC_ALL=C; export LC_ALL; \
        $(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@
 
-bench bench-clean:
+bench bench-clean bench-build:
        $(MAKE) -C $(srcdir)/benchtests $(PARALLELMFLAGS) objdir=`pwd` $@
 
 # Convenience target to rebuild ULPs for all math tests.
diff --git a/Rules b/Rules
index d8093b3f1f92daecf1cda668a1f75594952b4681..8306d36a078b9cd4c6f8d48a4c7dd75bca06db29 100644 (file)
--- a/Rules
+++ b/Rules
@@ -83,7 +83,7 @@ common-generated += dummy.o dummy.c
 \f
 # This makes all the auxiliary and test programs.
 
-.PHONY: others tests bench
+.PHONY: others tests bench bench-build
 
 ifeq ($(build-programs),yes)
 others: $(addprefix $(objpfx),$(others) $(sysdep-others) $(extra-objs))
index 61077ea9b6f7d4c342192429a8d90ecdf9bdaea7..a05974ec85d82f28bd4bd0ecc9f5d7b32f11c6fc 100644 (file)
@@ -128,7 +128,10 @@ bench-clean:
        rm -f $(binaries-bench-malloc) $(addsuffix .o,$(binaries-bench-malloc))
        rm -f $(timing-type) $(addsuffix .o,$(timing-type))
 
-bench: $(timing-type) $(gen-locales) bench-set bench-func bench-malloc
+bench: $(timing-type) $(gen-locales) bench-build bench-set bench-func \
+       bench-malloc
+# Target to only build the benchmark without running it.
+bench-build: $(binaries-bench) $(binaries-benchset) $(binaries-bench-malloc)
 
 bench-set: $(binaries-benchset)
        for run in $^; do \
This page took 0.199128 seconds and 5 git commands to generate.