|
@@ -77,4 +77,23 @@ define OPENBLAS_INSTALL_TARGET_CMDS
|
|
|
-C $(@D) install PREFIX=$(TARGET_DIR)/usr
|
|
|
endef
|
|
|
|
|
|
+ifeq ($(BR2_PACKAGE_OPENBLAS_INSTALL_TESTS),y)
|
|
|
+# Tests are always built, but are not installed, so we need to install
|
|
|
+# them manually. The set of available tests may fluctuate depending on
|
|
|
+# the architecture and other options, so only install whatever gets
|
|
|
+# built.
|
|
|
+define OPENBLAS_INSTALL_TESTS
|
|
|
+ mkdir -p $(TARGET_DIR)/usr/libexec/openblas/tests
|
|
|
+ find $(@D)/ctest \
|
|
|
+ -type f -name "x[sdcz]cblat[123]" -perm -0100 \
|
|
|
+ -exec $(INSTALL) -m 0755 {} \
|
|
|
+ $(TARGET_DIR)/usr/libexec/openblas/tests \;
|
|
|
+ find $(@D)/ctest \
|
|
|
+ -type f -name "[sdcz]in[123]" \
|
|
|
+ -exec $(INSTALL) -m 0644 {} \
|
|
|
+ $(TARGET_DIR)/usr/libexec/openblas/tests \;
|
|
|
+endef
|
|
|
+OPENBLAS_POST_INSTALL_TARGET_HOOKS += OPENBLAS_INSTALL_TESTS
|
|
|
+endif
|
|
|
+
|
|
|
$(eval $(generic-package))
|