From f1bfcaeaf037c5f5ad48526a2893a4ca3789c9f4 Mon Sep 17 00:00:00 2001 From: Daniel Zaoui Date: Tue, 22 May 2018 22:35:39 +0300 Subject: [PATCH] Add check-exactness target with -j support It is still on going. One of the issues is that for some mystic reason, the HAVE_EXACTNESS_DATA seems not checked as the target check-exactness is always present, no matter if the submodule exists. --- Makefile.am | 10 ++++++++++ configure.ac | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/Makefile.am b/Makefile.am index 00c1025..e0698ad 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,3 +20,13 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = exactness.pc ACLOCAL_AMFLAGS = -I m4 + +if HAVE_EXACTNESS_DATA + +check-exactness: + $(eval JOBS := $(shell [[ "${MAKEFLAGS}" =~ -j([0-9]+) ]] && echo $${BASH_REMATCH[1]} || echo 1)) + cd exactness-elm-data/default-profile; exactness -j ${JOBS} -p -b recordings tests.txt; cd - + +.PHONY: check-exactness + +endif diff --git a/configure.ac b/configure.ac index cc4549d..fbbbe5b 100644 --- a/configure.ac +++ b/configure.ac @@ -68,3 +68,7 @@ src/bin/Makefile src/lib/Makefile exactness.pc ]) + +exactness_data_dir=${srcdir}/exactness-elm-data/default-profile +AC_CHECK_FILE([$exactness_data_dir], [have_exactness_data="yes"], [have_exactness_data="no"]) +AM_CONDITIONAL([HAVE_EXACTNESS_DATA], [test "x${have_exactness_data}" = "xyes"])