From patchwork Wed Aug 15 14:38:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francois Perrad X-Patchwork-Id: 177684 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 21DF22C0086 for ; Thu, 16 Aug 2012 00:55:20 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1FE31A05A0; Wed, 15 Aug 2012 14:55:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id unm0FB3Ts3AZ; Wed, 15 Aug 2012 14:55:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 8DB49A05DA; Wed, 15 Aug 2012 14:39:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id A8AF88F753 for ; Wed, 15 Aug 2012 14:39:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8A45F8F7EB for ; Wed, 15 Aug 2012 14:39:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9SOBCKQbDORp for ; Wed, 15 Aug 2012 14:39:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by whitealder.osuosl.org (Postfix) with ESMTPS id 689FE80585 for ; Wed, 15 Aug 2012 14:39:06 +0000 (UTC) Received: by wibhm2 with SMTP id hm2so4286472wib.10 for ; Wed, 15 Aug 2012 07:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=VtN/u35ZID88RDImGi5nREmHw5rMI9miwWZbGs7o/RE=; b=wI4j95wWQeWO/JtLHnrW1prfObZqNE3rzrjmtKf9yRDOFFNXwk+zkPLFNeqvrnYSLo me9S3AUxUcazuDaHsST0dW8QZ71qf164VKRywFJ4qFjeUctlpl2vAvN+nhftDRhAL9i9 Vt5cTEZ5TZwjrPZqnwuZjAvEBiz7Cz07B/9uu1YSqlZ8UblO80S87llpqqXEwQXL4GaH cwhQC2lp+PofcJLEFPMxakzB0yARMdfnLJvMoQFv8iCFn58MRGVHyKFjF5aGLffWl1G/ Xn9sha1p5edgL6QyoLryU2XZ6y0uEW4+ncELX8b5m7f9A808KhuinhOS+182db3pt6eu H8PA== Received: by 10.180.82.230 with SMTP id l6mr2214189wiy.21.1345041544507; Wed, 15 Aug 2012 07:39:04 -0700 (PDT) Received: from xubuntu-12.04 (125.135.193.77.rev.sfr.net. [77.193.135.125]) by mx.google.com with ESMTPS id dc3sm28981440wib.7.2012.08.15.07.39.02 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 15 Aug 2012 07:39:03 -0700 (PDT) From: Francois Perrad To: buildroot@busybox.net Date: Wed, 15 Aug 2012 16:38:25 +0200 Message-Id: <1345041514-31539-3-git-send-email-francois.perrad@gadz.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1345041514-31539-1-git-send-email-francois.perrad@gadz.org> References: <1345041514-31539-1-git-send-email-francois.perrad@gadz.org> Subject: [Buildroot] [PATCH 03/12] microperl: build extensions at build time X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net just set PERL5LIB in build tree optim: symlink only one time, before the loop Signed-off-by: Francois Perrad --- package/microperl/microperl.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/package/microperl/microperl.mk b/package/microperl/microperl.mk index 0269b3f..f2a43c0 100644 --- a/package/microperl/microperl.mk +++ b/package/microperl/microperl.mk @@ -97,6 +97,7 @@ define MICROPERL_CONFIGURE_CMDS cp -f $(@D)/uconfig.sh $(@D)/config.sh echo "ccname='$(TARGET_CC)'" >>$(@D)/config.sh echo "PERL_CONFIG_SH=true" >>$(@D)/config.sh + touch $(@D)/config.h # avoid warning : out of date cd $(@D) ; $(HOST_DIR)/usr/bin/perl make_patchnum.pl ; \ $(HOST_DIR)/usr/bin/perl configpm endef @@ -106,16 +107,17 @@ define MICROPERL_BUILD_CMDS CC="$(HOSTCC)" bitcount.h $(MAKE) -f Makefile.micro -C $(@D) \ CC="$(TARGET_CC)" OPTIMIZE="$(TARGET_CFLAGS)" + $(MICROPERL_BUILD_EXTENSIONS) endef # Some extensions don't need a build run # We try to build anyway to avoid a huge black list # Just ignore make_ext.pl warning/errors define MICROPERL_BUILD_EXTENSIONS + cd $(@D); rm -f miniperl; ln -s $(HOST_DIR)/usr/bin/perl miniperl; for i in $(MICROPERL_MODS); do \ - cd $(@D); ln -sf $(HOST_DIR)/usr/bin/perl miniperl; \ - PERL5LIB=$(TARGET_DIR)/$(MICROPERL_ARCH_DIR) \ - $(HOST_DIR)/usr/bin/perl make_ext.pl MAKE="$(MAKE)" --nonxs \ + cd $(@D); PERL5LIB=lib \ + ./miniperl make_ext.pl MAKE="$(MAKE)" --nonxs \ `echo $$i|sed -e 's/.pm//'`; \ done endef @@ -131,7 +133,6 @@ define MICROPERL_INSTALL_TARGET_CMDS $(INSTALL) -m 0644 -D $(@D)/lib/$$i \ $(TARGET_DIR)/$(MICROPERL_MODS_DIR)/$$i; \ done - $(MICROPERL_BUILD_EXTENSIONS) for i in $(MICROPERL_MODS); do \ j=`echo $$i|cut -d : -f 1` ; \ if [ -d $(@D)/lib/$$j ] ; then \