openblas: add an option to install tests on the target
PATCH v2 1/1 openblas: add an option to install tests on the target
---
Changes v1 -> v2:
- Also install some necessary input files for the tests.
package/openblas/Config.in | 3 +++ package/openblas/openblas.mk | 13 +++++++++++++ 2 files changed, 16 insertions(+)
package/openblas/Config.in +3 -0
@@ -59,4 +59,7 @@ config BR2_PACKAGE_OPENBLAS_TARGET string "OpenBLAS target CPU" default BR2_PACKAGE_OPENBLAS_DEFAULT_TARGET +config BR2_PACKAGE_OPENBLAS_INSTALL_TESTS + bool "Install OpenBLAS tests" + endif
package/openblas/openblas.mk +13 -0
@@ -53,4 +53,17 @@ define OPENBLAS_INSTALL_TARGET_CMDS -C $(@D) install PREFIX=$(TARGET_DIR)/usr endef +ifeq ($(BR2_PACKAGE_OPENBLAS_INSTALL_TESTS),y) +define OPENBLAS_INSTALL_TESTS + for i in test ctest utest; do \ + mkdir -p $(TARGET_DIR)/usr/share/openblas/$$i && \ + cd $(@D)/$$i && \ + find . -type f -perm -a=x -exec $(INSTALL) -m 0755 {} $(TARGET_DIR)/usr/share/openblas/$$i/{} \; && \ + find . -type f -name "?in*" -exec $(INSTALL) -m 0644 {} $(TARGET_DIR)/usr/share/openblas/$$i/{} \; && \ + find . -type f -name "*.dat" -exec $(INSTALL) -m 0644 {} $(TARGET_DIR)/usr/share/openblas/$$i/{} \; ; \ + done +endef +OPENBLAS_POST_INSTALL_TARGET_HOOKS += OPENBLAS_INSTALL_TESTS +endif + $(eval $(generic-package))
Signature · 1 line
2.7.3
PATCH v2 1/1 openblas: add an option to install tests on the target
Hello,
package/openblas/openblas.mk define OPENBLAS_INSTALL_TARGET_CMDS · line 67
Quoted 12 lines · Vicente Olivert Riera
package/openblas/openblas.mk +12
-0+ifeq ($(BR2_PACKAGE_OPENBLAS_INSTALL_TESTS),y) +define OPENBLAS_INSTALL_TESTS + for i in test ctest utest; do \ + mkdir -p $(TARGET_DIR)/usr/share/openblas/$$i && \ + cd $(@D)/$$i && \ + find . -type f -perm -a=x -exec $(INSTALL) -m 0755 {} $(TARGET_DIR)/usr/share/openblas/$$i/{} \; && \ + find . -type f -name "?in*" -exec $(INSTALL) -m 0644 {} $(TARGET_DIR)/usr/share/openblas/$$i/{} \; && \ + find . -type f -name "*.dat" -exec $(INSTALL) -m 0644 {} $(TARGET_DIR)/usr/share/openblas/$$i/{} \; ; \ + done +endef +OPENBLAS_POST_INSTALL_TARGET_HOOKS += OPENBLAS_INSTALL_TESTS +endif
To be honest, I really dislike such complicated install procedures. Could you instead work with upstream to have them add an appropriate target that allows to install the test programs?
Looking at the upstream Github repository, they look very active, so getting some feedback should be possible.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 openblas: add an option to install tests on the target
Ok, I will try it.
Regards,
Vincent.
Quoted 28 lines · Thomas Petazzoni
Hello,
package/openblas/openblas.mk define OPENBLAS_INSTALL_TARGET_CMDS · line 67
Quoted 12 lines · Vicente Olivert Riera
package/openblas/openblas.mk +12
-0+ifeq ($(BR2_PACKAGE_OPENBLAS_INSTALL_TESTS),y) +define OPENBLAS_INSTALL_TESTS + for i in test ctest utest; do \ + mkdir -p $(TARGET_DIR)/usr/share/openblas/$$i && \ + cd $(@D)/$$i && \ + find . -type f -perm -a=x -exec $(INSTALL) -m 0755 {} $(TARGET_DIR)/usr/share/openblas/$$i/{} \; && \ + find . -type f -name "?in*" -exec $(INSTALL) -m 0644 {} $(TARGET_DIR)/usr/share/openblas/$$i/{} \; && \ + find . -type f -name "*.dat" -exec $(INSTALL) -m 0644 {} $(TARGET_DIR)/usr/share/openblas/$$i/{} \; ; \ + done +endef +OPENBLAS_POST_INSTALL_TARGET_HOOKS += OPENBLAS_INSTALL_TESTS +endifTo be honest, I really dislike such complicated install procedures. Could you instead work with upstream to have them add an appropriate target that allows to install the test programs?
Looking at the upstream Github repository, they look very active, so getting some feedback should be possible.
Thanks,
Thomas