diff options
author | Frank Hunleth <fhunleth@troodon-software.com> | 2016-02-25 09:56:35 -0500 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2016-03-07 00:02:44 +0100 |
commit | bb0f32a057c62b8a4d19b8c1c95bf4a76dabb693 (patch) | |
tree | 258d9243e80f4e896b8b27caca62830d84b06d83 /package/erlang | |
parent | f6a7bafd5a519e71c9415ba1a68fd8e863d2f9cc (diff) | |
download | buildroot-bb0f32a057c62b8a4d19b8c1c95bf4a76dabb693.tar.gz buildroot-bb0f32a057c62b8a4d19b8c1c95bf4a76dabb693.zip |
erlang: remove unwanted packages from staging too
This fixes an issue where an Erlang program compiles fine against files
in staging, but fails to run on the target due to the unwanted packages
being removed.
Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/erlang')
-rw-r--r-- | package/erlang/erlang.mk | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/package/erlang/erlang.mk b/package/erlang/erlang.mk index 638d2c2cca..3732d441ea 100644 --- a/package/erlang/erlang.mk +++ b/package/erlang/erlang.mk @@ -67,14 +67,20 @@ ifeq ($(BR2_PACKAGE_ERLANG_SMP),) ERLANG_CONF_OPTS += --disable-smp-support endif -# Remove source, example, gs and wx files from the target +# Remove source, example, gs and wx files from staging and target. ERLANG_REMOVE_PACKAGES = gs wx ifneq ($(BR2_PACKAGE_ERLANG_MEGACO),y) ERLANG_REMOVE_PACKAGES += megaco endif -define ERLANG_REMOVE_UNUSED +define ERLANG_REMOVE_STAGING_UNUSED + for package in $(ERLANG_REMOVE_PACKAGES); do \ + rm -rf $(STAGING_DIR)/usr/lib/erlang/lib/$${package}-*; \ + done +endef + +define ERLANG_REMOVE_TARGET_UNUSED find $(TARGET_DIR)/usr/lib/erlang -type d -name src -prune -exec rm -rf {} \; find $(TARGET_DIR)/usr/lib/erlang -type d -name examples -prune -exec rm -rf {} \; for package in $(ERLANG_REMOVE_PACKAGES); do \ @@ -82,7 +88,8 @@ define ERLANG_REMOVE_UNUSED done endef -ERLANG_POST_INSTALL_TARGET_HOOKS += ERLANG_REMOVE_UNUSED +ERLANG_POST_INSTALL_STAGING_HOOKS += ERLANG_REMOVE_STAGING_UNUSED +ERLANG_POST_INSTALL_TARGET_HOOKS += ERLANG_REMOVE_TARGET_UNUSED $(eval $(autotools-package)) $(eval $(host-autotools-package)) |