New make target to only build benchmark binaries

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.
This commit is contained in:
Siddhesh Poyarekar 2016-04-20 10:23:28 +05:30
parent 6f8222a1c5
commit a00d3f4a8c
4 changed files with 13 additions and 3 deletions

View File

@ -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

View 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.

2
Rules
View File

@ -83,7 +83,7 @@ common-generated += dummy.o dummy.c
# 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))

View 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 \