* [Buildroot] [PATCH v2] openblas: add an option to install tests on the target
@ 2016-07-05 11:16 Vicente Olivert Riera
2016-07-06 19:56 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Vicente Olivert Riera @ 2016-07-05 11:16 UTC (permalink / raw)
To: buildroot
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
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(+)
diff --git a/package/openblas/Config.in b/package/openblas/Config.in
index 51afaec..67dbf71 100644
--- a/package/openblas/Config.in
+++ b/package/openblas/Config.in
@@ -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
diff --git a/package/openblas/openblas.mk b/package/openblas/openblas.mk
index baeef05..a5e5100 100644
--- a/package/openblas/openblas.mk
+++ b/package/openblas/openblas.mk
@@ -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))
--
2.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread* [Buildroot] [PATCH v2] openblas: add an option to install tests on the target
2016-07-05 11:16 [Buildroot] [PATCH v2] openblas: add an option to install tests on the target Vicente Olivert Riera
@ 2016-07-06 19:56 ` Thomas Petazzoni
2016-07-08 10:13 ` Vicente Olivert Riera
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2016-07-06 19:56 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 5 Jul 2016 12:16:05 +0100, Vicente Olivert Riera wrote:
> +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
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread* [Buildroot] [PATCH v2] openblas: add an option to install tests on the target
2016-07-06 19:56 ` Thomas Petazzoni
@ 2016-07-08 10:13 ` Vicente Olivert Riera
0 siblings, 0 replies; 3+ messages in thread
From: Vicente Olivert Riera @ 2016-07-08 10:13 UTC (permalink / raw)
To: buildroot
Ok, I will try it.
Regards,
Vincent.
On 06/07/16 21:56, Thomas Petazzoni wrote:
> Hello,
>
> On Tue, 5 Jul 2016 12:16:05 +0100, Vicente Olivert Riera wrote:
>
>> +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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-08 10:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-05 11:16 [Buildroot] [PATCH v2] openblas: add an option to install tests on the target Vicente Olivert Riera
2016-07-06 19:56 ` Thomas Petazzoni
2016-07-08 10:13 ` Vicente Olivert Riera
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox