diff options
author | Ulf Samuelsson <ulf.samuelsson@atmel.com> | 2009-01-25 08:14:37 +0000 |
---|---|---|
committer | Ulf Samuelsson <ulf.samuelsson@atmel.com> | 2009-01-25 08:14:37 +0000 |
commit | ed7f49bf495f21b36b9e7cbcfe06c25dc550af67 (patch) | |
tree | 386907914dd9f9f19942fcb7e052cb28e29ec814 /package/microperl | |
parent | 67d74d8a7a0bc7bd890b0d911055c362d74d3049 (diff) |
Fix make problems with perl
Diffstat (limited to 'package/microperl')
-rw-r--r-- | package/microperl/microperl.mk | 48 |
1 files changed, 38 insertions, 10 deletions
diff --git a/package/microperl/microperl.mk b/package/microperl/microperl.mk index 79ddff44b..a9aa2691e 100644 --- a/package/microperl/microperl.mk +++ b/package/microperl/microperl.mk @@ -23,18 +23,38 @@ $(DL_DIR)/$(MICROPERL_SOURCE): $(MICROPERL_DIR)/.source: $(DL_DIR)/$(MICROPERL_SOURCE) $(MICROPERL_CAT) $(DL_DIR)/$(MICROPERL_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - + (cd $(MICROPERL_DIR); chmod -R u+w *) touch $@ -$(MICROPERL_DIR)/.configured: $(MICROPERL_DIR)/.source -ifeq ($(BR2_PACKAGE_AUTOMAKE),y) +$(MICROPERL_DIR)/.host_configured: $(MICROPERL_DIR)/.source + # we need to build a perl for the host just for Errno.pm + (cd $(MICROPERL_DIR); ./Configure -Dcc=$(HOSTCC) -de ) + touch $@ + + +$(MICROPERL_DIR)/.host_configured_and_fixed: $(MICROPERL_DIR)/.host_configured + $(SED) 's/^.*<command-line>.*//g' $(MICROPERL_DIR)/makefile + $(SED) 's/^.*<command-line>.*//g' $(MICROPERL_DIR)/x2p/makefile + touch $@ + +$(MICROPERL_DIR)/.host_make: $(MICROPERL_DIR)/.host_configured_and_fixed + $(MAKE) -C $(MICROPERL_DIR) || echo "An error is expected on make" + touch $@ + +$(MICROPERL_DIR)/.host_make_fixed: $(MICROPERL_DIR)/.host_make + $(SED) 's#^.*<asm/page.h>.*##g' $(MICROPERL_DIR)/ext/IPC/SysV/SysV.c + $(MAKE) -C $(MICROPERL_DIR) test || echo "An error is expected on make test" + touch $@ + +$(MICROPERL_DIR)/.configured: $(MICROPERL_DIR)/.host_make_fixed # 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))"; \ + (cd $(MICROPERL_DIR); \ + chmod a+x ext/util/make_ext; \ + 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; \ + (cd $(MICROPERL_DIR); \ + chmod u+w uconfig.h; ./uconfig.sh; \ + $(MAKE) -f $(MICROPERL_DIR)/Makefile.micro regen_uconfig; \ $(SED) 's,PRIVLIB ".*,PRIVLIB "/$(MICROPERL_MODS_DIR)",' \ -e 's,PRIVLIB_EXP ".*,PRIVLIB_EXP "$(MICROPERL_MODS_DIR)",' \ -e 's,BIN ".*,BIN "/usr/bin",' \ @@ -43,7 +63,7 @@ endif touch $@ $(MICROPERL_DIR)/microperl: $(MICROPERL_DIR)/.configured - $(MAKE) -f Makefile.micro CC=$(TARGET_CC) \ + $(MAKE) -f $(MICROPERL_DIR)/Makefile.micro CC=$(TARGET_CC) \ OPTIMIZE="$(TARGET_CFLAGS)" -C $(MICROPERL_DIR) ifeq ($(BR2_PACKAGE_AUTOMAKE),y) #(cd $(@D); \ @@ -58,7 +78,7 @@ ifneq ($(MICROPERL_MODS),) [ -d $$i ] || mkdir -p $$i; \ done; \ for i in $(MICROPERL_MODS); do \ - cp -dpf lib/$$i $(TARGET_DIR)/$(MICROPERL_MODS_DIR)/$$i; \ + cp -dpf $(MICROPERL_DIR)/lib/$$i $(TARGET_DIR)/$(MICROPERL_MODS_DIR)/$$i; \ done; \ ) endif @@ -69,6 +89,14 @@ microperl: uclibc $(TARGET_DIR)/usr/bin/microperl microperl-source: $(DL_DIR)/$(MICROPERL_SOURCE) +microperl-unpacked: $(MICROPERL_DIR)/.source + +microperl-config: $(MICROPERL_DIR)/.host_configured + +microperl-host: $(MICROPERL_DIR)/.host_make + +microperl-host-fixed: $(MICROPERL_DIR)/.host_make_fixed + microperl-clean: rm -rf $(TARGET_DIR)/usr/bin/microperl \ $(TARGET_DIR)/$(MICROPERL_MODS_DIR) $(TARGET_DIR)/usr/bin/perl |