From 3ea3eaf5bda21529fc8a8da3d8b07ebc3875ba7e Mon Sep 17 00:00:00 2001
From: Trevor Gamblin <tgamblin@baylibre.com>
Date: Fri, 2 Aug 2024 09:48:43 -0400
Subject: [PATCH] Makefile.in: Add target to only build tests (not run them)

Not sending upstream as this is only a start of a solution to
installable tests: It's useful for us already as is.

Upstream-Status: Inappropriate [not a complete solution]

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Refactored for 3.4
Signed-off-by: Armin Kuster <akuster@mvista.com>

Refactor for 3.10, including turning it into an mbox for easier use.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
 Makefile.in           | 3 +++
 testsuite/Makefile.in | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/Makefile.in b/Makefile.in
index 71ad761..0f239f4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -53,6 +53,9 @@ clean distclean mostlyclean maintainer-clean tags:
 	  echo "Making $@ in $$d" ; (cd $$d && $(MAKE) $@); done
 	$(MAKE) $@-here
 
+buildtest:
+	echo "Making $@ in testsuite" ; (cd testsuite && $(MAKE) $@)
+
 check-here:
 	true
 
diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in
index 0699fa0..8ac9983 100644
--- a/testsuite/Makefile.in
+++ b/testsuite/Makefile.in
@@ -137,6 +137,8 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) ../non-nettle.$(OBJEXT) \
 # data.
 VALGRIND = valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes @IF_ASM@ --partial-loads-ok=yes
 
+buildtest: $(TS_ALL)
+
 check: $(TS_ALL) $(TS_ALL:sc-%=%)
 	TEST_SHLIB_DIR="$(TEST_SHLIB_DIR)" \
 	  srcdir="$(srcdir)" \
