From patchwork Thu Aug 23 08:14:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Francois Perrad X-Patchwork-Id: 179555 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 515472C0093 for ; Thu, 23 Aug 2012 18:15:07 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C4B2FA053E; Thu, 23 Aug 2012 08:15:03 +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 FOO-RWkQ3Nng; Thu, 23 Aug 2012 08:14:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 6396DA0514; Thu, 23 Aug 2012 08:14:47 +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 0AAF58F753 for ; Thu, 23 Aug 2012 08:14:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D63B38F022 for ; Thu, 23 Aug 2012 08:14:37 +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 twWOsM9Yddap for ; Thu, 23 Aug 2012 08:14:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id C48708F699 for ; Thu, 23 Aug 2012 08:14:36 +0000 (UTC) Received: by mail-we0-f171.google.com with SMTP id x43so476859wey.16 for ; Thu, 23 Aug 2012 01:14:36 -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=csO2qHw2U48MIa+yJliqJB31cTEBTDuBLXp4xGvCSWI=; b=E2Qt3UxIY1J5qQ/YRL6/fvrnkftbIbcycmzIPiC9WVhLTzCISKjcoQBFxHWtr5i4Di zjqBX7Ii4jIMttxsYj0KbyE+aVuXkjFem7dd07L495OXwy4AqHkcjq0/aSiQ/TjDxeOl +wt7NYwiVzJ2vHgpH6iM99StLIsyUjY1hoTtoC/K8qJzge4boE6zOIla3ACxtKZjew05 FspsD8VjJXBEDWzp2NGqjgVRoJjQM3PT8hvQxB+ySvV1W+2pUu6IZJkvAQuiH709dA7G VxXkcZtbifmSosRzIdtL+dW6r2Fjukhxc1e5dDwxYNNNnzz8Pq5eU2z4ViNrudcoOFte RACQ== Received: by 10.216.237.149 with SMTP id y21mr407450weq.102.1345709676436; Thu, 23 Aug 2012 01:14:36 -0700 (PDT) Received: from xubuntu-12.04 (113.120.86.79.rev.sfr.net. [79.86.120.113]) by mx.google.com with ESMTPS id q4sm43651163wix.9.2012.08.23.01.14.34 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 23 Aug 2012 01:14:35 -0700 (PDT) From: Francois Perrad To: buildroot@busybox.net Date: Thu, 23 Aug 2012 10:14:15 +0200 Message-Id: <1345709660-25443-4-git-send-email-francois.perrad@gadz.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1345709660-25443-1-git-send-email-francois.perrad@gadz.org> References: <1345709660-25443-1-git-send-email-francois.perrad@gadz.org> Subject: [Buildroot] [PATCH 4/9] 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 b2a912a..fa92144 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 \