[OpenWrt-Devel] [PATCH] micropython-lib: fix make install seldom fail
Jérôme Poulin
jeromepoulin at gmail.com
Mon Jun 13 17:47:50 EDT 2016
Since make install path was hardcoded inside the build dir, it can sometime
fail with cp indicating that source and destination are the same since make
install will copy all py file in build dir to install dir. In this case,
install dir is in build dir causing a loop.
---
lang/micropython-lib/Makefile | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lang/micropython-lib/Makefile b/lang/micropython-lib/Makefile
index b8af737..aefb8f4 100644
--- a/lang/micropython-lib/Makefile
+++ b/lang/micropython-lib/Makefile
@@ -22,6 +22,7 @@ PKG_SOURCE_VERSION:=bfbbf85a181d84e2494ea6f15be311734666bf67
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
+PKG_INSTALL_DIR:=$(BUILD_DIR)/_install_tmp
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
@@ -43,12 +44,12 @@ endef
MAKE_FLAGS:=\
-C $(PKG_BUILD_DIR) \
- PREFIX=$(PKG_BUILD_DIR)/_install_tmp \
+ PREFIX=$(PKG_INSTALL_DIR) \
install
define Package/micropython-lib/install
$(INSTALL_DIR) $(1)/usr/lib/micropython
- $(CP) $(PKG_BUILD_DIR)/_install_tmp/* $(1)/usr/lib/micropython
+ $(CP) $(PKG_INSTALL_DIR)/* $(1)/usr/lib/micropython
endef
$(eval $(call BuildPackage,micropython-lib))
--
2.7.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list