diff mbox series

[3/3] lmbench: emulate --prefix to avoid scattering binaries all over

Message ID 20210506003957.2994235-4-vgupta@synopsys.com
State Superseded
Headers show
Series Buildroot updates for ARC, LMBench | expand

Commit Message

Vineet Gupta May 6, 2021, 12:39 a.m. UTC
- moves all lmbench binaries to <target>/lmbench/bin/<ARCH>
 - scripts copied to <target>/lmbench/scripts
 - scripts/os overwritten to setup "OS" as expected by LMBench runtime scripts

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 package/lmbench/lmbench.mk | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/package/lmbench/lmbench.mk b/package/lmbench/lmbench.mk
index 2f3b19b5f820..be6b3170099a 100644
--- a/package/lmbench/lmbench.mk
+++ b/package/lmbench/lmbench.mk
@@ -36,7 +36,14 @@  define LMBENCH_BUILD_CMDS
 endef
 
 define LMBENCH_INSTALL_TARGET_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) CFLAGS="$(TARGET_CFLAGS)" OS=$(ARCH) CC="$(TARGET_CC)" BASE=$(TARGET_DIR)/usr -C $(@D)/src install
+	mkdir -p $(TARGET_DIR)/lmbench/tmp
+	mkdir -p $(TARGET_DIR)/lmbench/scripts
+	$(TARGET_MAKE_ENV) $(MAKE) CFLAGS="$(TARGET_CFLAGS)" OS=$(ARCH) CC="$(TARGET_CC)" BASE=$(TARGET_DIR)/lmbench/tmp -C $(@D)/src install
+	mkdir -p $(TARGET_DIR)/lmbench/bin/$(ARCH)
+	mv $(TARGET_DIR)/lmbench/tmp/bin/* $(TARGET_DIR)/lmbench/bin/$(ARCH)
+	rm -rf $(TARGET_DIR)/lmbench/tmp/
+	cp -rfd $(@D)/scripts/ $(TARGET_DIR)/lmbench/.
+	echo "export OS=${ARCH}" >  $(TARGET_DIR)/lmbench/scripts/os
 endef
 
 $(eval $(generic-package))