From b8d5182b93289e42a5e86180f1c2f60da603b8a1 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Tue, 29 Jul 2014 20:18:15 +0200 Subject: [PATCH] luarocks: refactor with TARGET_FINALIZE_HOOKS Signed-off-by: Francois Perrad Signed-off-by: Thomas Petazzoni --- Makefile | 1 - package/luarocks/luarocks.mk | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ee6649435d..022beeaf3d 100644 --- a/Makefile +++ b/Makefile @@ -576,7 +576,6 @@ endif ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY)$(BR2_PACKAGE_PYTHON3_PYC_ONLY),y) find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f endif - rm -rf $(TARGET_DIR)/usr/lib/luarocks $(STRIP_FIND_CMD) | xargs $(STRIPCMD) 2>/dev/null || true if test -d $(TARGET_DIR)/lib/modules; then \ find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \ diff --git a/package/luarocks/luarocks.mk b/package/luarocks/luarocks.mk index 80b9e9fb68..f4c06d6de3 100644 --- a/package/luarocks/luarocks.mk +++ b/package/luarocks/luarocks.mk @@ -51,3 +51,10 @@ $(eval $(host-generic-package)) LUAROCKS_RUN = LUA_PATH="$(HOST_DIR)/usr/share/lua/$(LUAINTERPRETER_ABIVER)/?.lua" \ $(LUA_RUN) $(HOST_DIR)/usr/bin/luarocks + +define LUAROCKS_FINALIZE_TARGET + rm -rf $(TARGET_DIR)/usr/lib/luarocks +endef + +TARGET_FINALIZE_HOOKS += LUAROCKS_FINALIZE_TARGET + -- 2.30.2