mirror of
https://github.com/openwrt/packages.git
synced 2025-12-22 16:54:32 +04:00
python: add include guard for python-host.mk and include in Makefile
So that it can be included twice. python-package.mk include python-host.mk, but at some point in time python-host.mk is not exported to staging_dir yet. So, to have in python's Makefile, we need to include it in the Makefile, and to prevent double inclusion (if python-host.mk is exported from a previous build), the include guard is added. Also, moved the includes after some vars were set. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
@@ -7,6 +7,9 @@
|
|||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
# This file provides the necsessary host build variables
|
||||||
|
include ./files/python-host.mk
|
||||||
|
|
||||||
# The file included below defines PYTHON_VERSION
|
# The file included below defines PYTHON_VERSION
|
||||||
include ./files/python-package.mk
|
include ./files/python-package.mk
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,9 @@
|
|||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
ifneq ($(__python_host_mk_inc),1)
|
||||||
|
__python_host_mk_inc=1
|
||||||
|
|
||||||
# Compatibility fallback for older OpenWrt and LEDE versions
|
# Compatibility fallback for older OpenWrt and LEDE versions
|
||||||
ifeq ($(STAGING_DIR_HOSTPKG),)
|
ifeq ($(STAGING_DIR_HOSTPKG),)
|
||||||
$(warning STAGING_DIR_HOSTPKG is unset - falling back to $$(STAGING_DIR)/host)
|
$(warning STAGING_DIR_HOSTPKG is unset - falling back to $$(STAGING_DIR)/host)
|
||||||
@@ -71,3 +74,4 @@ define Build/Compile/HostPyMod
|
|||||||
$(3))
|
$(3))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
endif # __python_host_mk_inc
|
||||||
|
|||||||
Reference in New Issue
Block a user