diff options
| author | Yann E. MORIN <yann.morin.1998@free.fr> | 2016-06-22 21:07:37 +0200 |
|---|---|---|
| committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2016-07-05 15:53:05 +0200 |
| commit | 50adab522c0fbf1c99b904b8513200b114eb4a0b (patch) | |
| tree | 5ff32934efcc96e15eedc81ceabdf94488def225 /package/python3/python3.mk | |
| parent | 624dbec7e1f971519be9a165b09c0b95a8ee282b (diff) | |
| download | buildroot-50adab522c0fbf1c99b904b8513200b114eb4a0b.tar.gz buildroot-50adab522c0fbf1c99b904b8513200b114eb4a0b.zip | |
packages: use the <PKG>_TARGET_FINALIZE_HOOKS
Register package-specific target-finalize hooks with the
newly-introduced <PKG>_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" <yann.morin.1998@free.fr>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/python3/python3.mk')
| -rw-r--r-- | package/python3/python3.mk | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/package/python3/python3.mk b/package/python3/python3.mk index f33b337ab7..34e1297563 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -217,7 +217,7 @@ define PYTHON3_CREATE_PYC_FILES endef ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY)$(BR2_PACKAGE_PYTHON3_PY_PYC),y) -TARGET_FINALIZE_HOOKS += PYTHON3_CREATE_PYC_FILES +PYTHON3_TARGET_FINALIZE_HOOKS += PYTHON3_CREATE_PYC_FILES endif ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY),y) @@ -225,7 +225,7 @@ define PYTHON3_REMOVE_PY_FILES find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) -name '*.py' -print0 | \ xargs -0 --no-run-if-empty rm -f endef -TARGET_FINALIZE_HOOKS += PYTHON3_REMOVE_PY_FILES +PYTHON3_TARGET_FINALIZE_HOOKS += PYTHON3_REMOVE_PY_FILES endif # Normally, *.pyc files should not have been compiled, but just in @@ -235,16 +235,14 @@ define PYTHON3_REMOVE_PYC_FILES find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) -name '*.pyc' -print0 | \ xargs -0 --no-run-if-empty rm -f endef -TARGET_FINALIZE_HOOKS += PYTHON3_REMOVE_PYC_FILES +PYTHON3_TARGET_FINALIZE_HOOKS += PYTHON3_REMOVE_PYC_FILES endif # In all cases, we don't want to keep the optimized .opt-1.pyc and # .opt-2.pyc files, since they can't work without their non-optimized # variant. -ifeq ($(BR2_PACKAGE_PYTHON3),y) define PYTHON3_REMOVE_OPTIMIZED_PYC_FILES find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) -name '*.opt-1.pyc' -print0 -o -name '*.opt-2.pyc' -print0 | \ xargs -0 --no-run-if-empty rm -f endef -TARGET_FINALIZE_HOOKS += PYTHON3_REMOVE_OPTIMIZED_PYC_FILES -endif +PYTHON3_TARGET_FINALIZE_HOOKS += PYTHON3_REMOVE_OPTIMIZED_PYC_FILES |

