diff options
author | Danomi Manchego <danomimanchego123@gmail.com> | 2015-07-20 21:59:24 -0400 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2015-07-21 23:42:36 +0200 |
commit | c30dd5de91404744bbe2a5ffece0d00ce68f1f64 (patch) | |
tree | bd02ddc3d653706bd78f7cd4902e7f97657f11ca /package/perl | |
parent | 751f6f5af501983cc2b05fc9519fb0b1c7b57733 (diff) |
perl: only run finalize hook when necessary
The PERL_FINALIZE_TARGET always runs, even if perl is not installed.
This results in errors from the find command when it fails to find
anything, even when doing "make -s":
>>> Finalizing target directory
find: `...../output/target/usr/lib/perl5/': No such file or directory
find: `...../output/target/usr/lib/perl5/': No such file or directory
find: `...../output/target/usr/lib/perl5/': No such file or directory
This is not helpful for projects that do not select Perl. Silence this
by making the hook conditional on package selection.
Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/perl')
-rw-r--r-- | package/perl/perl.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/package/perl/perl.mk b/package/perl/perl.mk index 091c0327d..1e6a054aa 100644 --- a/package/perl/perl.mk +++ b/package/perl/perl.mk @@ -115,6 +115,7 @@ endef $(eval $(generic-package)) $(eval $(host-generic-package)) +ifeq ($(BR2_PACKAGE_PERL),y) 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 @@ -122,6 +123,5 @@ define PERL_FINALIZE_TARGET 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 endef - TARGET_FINALIZE_HOOKS += PERL_FINALIZE_TARGET - +endif |