From patchwork Fri Jun 21 11:56:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Genoud X-Patchwork-Id: 253199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 18CDC2C02C2 for ; Fri, 21 Jun 2013 21:58:12 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9FF7710C136; Fri, 21 Jun 2013 11:58:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4bF4jQF3CT2X; Fri, 21 Jun 2013 11:57:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4637910C0A8; Fri, 21 Jun 2013 11:57:25 +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 089128F79E for ; Fri, 21 Jun 2013 11:57:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EEAA98C4CD for ; Fri, 21 Jun 2013 11:57:21 +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 86sTuIwIMvZC for ; Fri, 21 Jun 2013 11:57:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by whitealder.osuosl.org (Postfix) with ESMTPS id B2A598CE8F for ; Fri, 21 Jun 2013 11:57:20 +0000 (UTC) Received: by mail-wi0-f179.google.com with SMTP id hj3so522463wib.12 for ; Fri, 21 Jun 2013 04:57:19 -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=wvzZmQMS1k2aLsLBPV0+vd3nRtcSqfi25eKJ3UQaWrY=; b=0uc0nz3WW6D/QXNTnjMyd3Si046DTSvynjvuKgTG8jQ1HwFXnDAcUnrGfeWAzfNbTo 7BHhJihBWFor4N+kAwXXzIeVjPHaij9V+24QLyR/VxJIxZsl4njqVYEHrEt1Q7IFsHAw P+O6pEI+slPlaZjQ636Z4Uv3eU63p9jDBMb7EaM4hkXUwlt8wDNKH9NWYwhJbpwGuF7y 4pdHrxQE6aW2LDsWMPHYhnFAxtBegjjzwSCh3ZGE+cUt/JCiEFPsZP/HcFPsB8bd3zyF mMjfiOx6cEd3WU3X6iKqm/hi+qaOcYtJP6MCm4zCeEteVnF4btjiK5Fja3pE40ISF70q Corw== X-Received: by 10.180.210.148 with SMTP id mu20mr2480414wic.38.1371815839061; Fri, 21 Jun 2013 04:57:19 -0700 (PDT) Received: from lnx-rg.pr (lyon.paratronic.fr. [213.41.177.106]) by mx.google.com with ESMTPSA id fv11sm6698658wic.11.2013.06.21.04.57.17 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Jun 2013 04:57:18 -0700 (PDT) From: richard.genoud@gmail.com To: buildroot@busybox.net Date: Fri, 21 Jun 2013 13:56:58 +0200 Message-Id: <51c43f9e.ebbbb40a.0abf.ffffba0d@mx.google.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1371815822-29453-1-git-send-email-y> References: <1371743610-17810-1-git-send-email-richard.genoud@gmail.com> <1371815822-29453-1-git-send-email-y> Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH 2/6] tcl: use make conditions 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 From: Richard Genoud As suggested by Thomas Petazzoni, make conditions should be used rather than shell condition in Makefiles. Signed-off-by: Richard Genoud --- package/tcl/tcl.mk | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/package/tcl/tcl.mk b/package/tcl/tcl.mk index ad23b80..2526ca1 100644 --- a/package/tcl/tcl.mk +++ b/package/tcl/tcl.mk @@ -24,15 +24,22 @@ HOST_TCL_CONF_OPT = \ define TCL_POST_INSTALL_CLEANUP -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libtcl8.4.so - -if [ "$(BR2_PACKAGE_TCL_DEL_ENCODINGS)" = "y" ]; then \ - rm -Rf $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/encoding/*; \ - fi - -if [ "$(BR2_PACKAGE_TCL_TCLSH)" != "y" ]; then \ - rm -f $(TARGET_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR); \ - fi endef - TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_CLEANUP +ifeq ($(BR2_PACKAGE_TCL_DEL_ENCODINGS),y) +define TCL_REMOVE_ENCODINGS + rm -rf $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/encoding/* +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_ENCODINGS +endif + +ifneq ($(BR2_PACKAGE_TCL_TCLSH),y) +define TCL_REMOVE_TCLSH + rm -f $(TARGET_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR) +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_TCLSH +endif + $(eval $(autotools-package)) $(eval $(host-autotools-package))