From 50adab522c0fbf1c99b904b8513200b114eb4a0b Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Wed, 22 Jun 2016 21:07:37 +0200 Subject: packages: use the _TARGET_FINALIZE_HOOKS Register package-specific target-finalize hooks with the newly-introduced _TARGET_FINALIZE_HOOKS. This incidentally fixes luarocks, which was registering target-finalize hooks even when it was not enabled. To be noted, the skeleton package is not converted, because it is not optional, we always have it; so its hooks would always be registered anyway. Besides, the followup patches would render this conversion moot anyway, since those hooks would be spread across the various skeleton packages. Signed-off-by: "Yann E. MORIN" Reviewed-by: Romain Naour Signed-off-by: Thomas Petazzoni --- package/python/python.mk | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'package/python/python.mk') diff --git a/package/python/python.mk b/package/python/python.mk index 6117a6d4ba..9026703520 100644 --- a/package/python/python.mk +++ b/package/python/python.mk @@ -226,7 +226,7 @@ define PYTHON_CREATE_PYC_FILES endef ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY)$(BR2_PACKAGE_PYTHON_PY_PYC),y) -TARGET_FINALIZE_HOOKS += PYTHON_CREATE_PYC_FILES +PYTHON_TARGET_FINALIZE_HOOKS += PYTHON_CREATE_PYC_FILES endif ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y) @@ -234,7 +234,7 @@ define PYTHON_REMOVE_PY_FILES find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR) -name '*.py' -print0 | \ xargs -0 --no-run-if-empty rm -f endef -TARGET_FINALIZE_HOOKS += PYTHON_REMOVE_PY_FILES +PYTHON_TARGET_FINALIZE_HOOKS += PYTHON_REMOVE_PY_FILES endif # Normally, *.pyc files should not have been compiled, but just in @@ -244,14 +244,12 @@ define PYTHON_REMOVE_PYC_FILES find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR) -name '*.pyc' -print0 | \ xargs -0 --no-run-if-empty rm -f endef -TARGET_FINALIZE_HOOKS += PYTHON_REMOVE_PYC_FILES +PYTHON_TARGET_FINALIZE_HOOKS += PYTHON_REMOVE_PYC_FILES endif # In all cases, we don't want to keep the optimized .pyo files -ifeq ($(BR2_PACKAGE_PYTHON),y) define PYTHON_REMOVE_PYO_FILES find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR) -name '*.pyo' -print0 | \ xargs -0 --no-run-if-empty rm -f endef -TARGET_FINALIZE_HOOKS += PYTHON_REMOVE_PYO_FILES -endif +PYTHON_TARGET_FINALIZE_HOOKS += PYTHON_REMOVE_PYO_FILES -- cgit v1.2.3