summaryrefslogtreecommitdiff
path: root/package/microperl
diff options
context:
space:
mode:
Diffstat (limited to 'package/microperl')
-rw-r--r--package/microperl/microperl.mk22
1 files changed, 20 insertions, 2 deletions
diff --git a/package/microperl/microperl.mk b/package/microperl/microperl.mk
index 08c8356b3..aa77ceb7a 100644
--- a/package/microperl/microperl.mk
+++ b/package/microperl/microperl.mk
@@ -13,7 +13,11 @@ MICROPERL_DIR=$(BUILD_DIR)/perl-$(MICROPERL_VER)
MICROPERL_MODS_DIR=/usr/lib/perl$(MICROPERL_MAJ)/$(MICROPERL_VER)
MICROPERL_MODS=$(subst ",,$(BR2_PACKAGE_MICROPERL_MODULES))
# ")
-
+ifeq ($(BR2_PACKAGE_AUTOMAKE),y)
+MICROPERL_MODS+=File/Basename.pm Errno.pm Config.pm IO/File.pm Symbol.pm \
+ SelectSaver.pm IO/Seekable.pm IO/Handle.pm IO.pm XSLoader.pm \
+ DynaLoader.pm AutoLoader.pm
+endif
$(DL_DIR)/$(MICROPERL_SOURCE):
$(WGET) -P $(DL_DIR) $(MICROPERL_SITE)/$(MICROPERL_SOURCE)
@@ -22,6 +26,13 @@ $(MICROPERL_DIR)/.source: $(DL_DIR)/$(MICROPERL_SOURCE)
touch $@
$(MICROPERL_DIR)/.configured: $(MICROPERL_DIR)/.source
+ifeq ($(BR2_PACKAGE_AUTOMAKE),y)
+ # we need to build a perl for the host just for Errno.pm
+ (cd $(MICROPERL_DIR) ; ./Configure -de ; \
+ $(MAKE) CC="$(HOSTCC)" ; \
+ $(SHELL) ext/util/make_ext nonxs Errno MAKE="$(firstword $(MAKE))" ; \
+ )
+endif
(cd $(MICROPERL_DIR) ; chmod u+w uconfig.h ; . ./uconfig.sh ; \
$(MAKE) -f Makefile.micro regen_uconfig ; \
$(SED) 's,PRIVLIB ".*,PRIVLIB "/$(MICROPERL_MODS_DIR)",' \
@@ -34,6 +45,11 @@ $(MICROPERL_DIR)/.configured: $(MICROPERL_DIR)/.source
$(MICROPERL_DIR)/microperl: $(MICROPERL_DIR)/.configured
$(MAKE) -f Makefile.micro CC=$(TARGET_CC) \
OPTIMIZE="$(TARGET_CFLAGS)" -C $(MICROPERL_DIR)
+ifeq ($(BR2_PACKAGE_AUTOMAKE),y)
+ #(cd $(@D) ; \
+ # CONFIG=uconfig.h $(SHELL) ext/util/make_ext nonxs Errno MAKE="$(firstword $(MAKE))" ; \
+ #)
+endif
$(TARGET_DIR)/usr/bin/microperl: $(MICROPERL_DIR)/microperl
ifneq ($(MICROPERL_MODS),)
@@ -47,13 +63,15 @@ ifneq ($(MICROPERL_MODS),)
)
endif
cp -dpf $(MICROPERL_DIR)/microperl $(TARGET_DIR)/usr/bin/microperl
+ (cd $(TARGET_DIR)/usr/bin ; rm -f perl ; ln -s microperl perl ;)
microperl: uclibc $(TARGET_DIR)/usr/bin/microperl
microperl-source: $(DL_DIR)/$(MICROPERL_SOURCE)
microperl-clean:
- rm -rf $(TARGET_DIR)/usr/bin/microperl $(TARGET_DIR)/$(MICROPERL_MODS_DIR)
+ rm -rf $(TARGET_DIR)/usr/bin/microperl \
+ $(TARGET_DIR)/$(MICROPERL_MODS_DIR) $(TARGET_DIR)/usr/bin/perl
-rmdir $(TARGET_DIR)/usr/lib/perl$(MICROPERL_MAJ)
-$(MAKE) -C $(MICROPERL_DIR) -f Makefile.micro clean