]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
perl: refactor with TARGET_FINALIZE_HOOKS
authorFrancois Perrad <fperrad@gmail.com>
Tue, 29 Jul 2014 18:18:14 +0000 (20:18 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 29 Jul 2014 18:22:37 +0000 (20:22 +0200)
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Makefile
package/perl/perl.mk

index 258495c76a613d6b9d445c8ae74333e93d87bf5a..ee6649435ddf90282413176bb5836235f4bfded3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -577,11 +577,6 @@ ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY)$(BR2_PACKAGE_PYTHON3_PYC_ONLY),y)
        find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f
 endif
        rm -rf $(TARGET_DIR)/usr/lib/luarocks
-       rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/pod
-       rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE
-       find $(TARGET_DIR)/usr/lib/perl5/ -name 'extralibs.ld' -print0 | xargs -0 rm -f
-       find $(TARGET_DIR)/usr/lib/perl5/ -name '*.bs' -print0 | xargs -0 rm -f
-       find $(TARGET_DIR)/usr/lib/perl5/ -name '.packlist' -print0 | xargs -0 rm -f
        $(STRIP_FIND_CMD) | xargs $(STRIPCMD) 2>/dev/null || true
        if test -d $(TARGET_DIR)/lib/modules; then \
                find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \
index e4aad7f6c5c874bc926698fe6362841fb7357c03..e01570ea7da649887a8ed9074c58faa065074099 100644 (file)
@@ -122,3 +122,15 @@ endef
 PERL_POST_INSTALL_STAGING_HOOKS += PERL_ADD_CORE_H
 
 $(eval $(generic-package))
+
+define PERL_FINALIZE_TARGET
+       rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/pod
+       rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE
+       find $(TARGET_DIR)/usr/lib/perl5/ -name 'extralibs.ld' -print0 | xargs -0 rm -f
+       find $(TARGET_DIR)/usr/lib/perl5/ -name '*.bs' -print0 | xargs -0 rm -f
+       find $(TARGET_DIR)/usr/lib/perl5/ -name '.packlist' -print0 | xargs -0 rm -f
+       find $(TARGET_DIR)/usr/lib/perl5/ -name 'autosplit.ix' -print0 | xargs -0 rm -f
+endef
+
+TARGET_FINALIZE_HOOKS += PERL_FINALIZE_TARGET
+