From patchwork Wed Apr 12 09:39:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 749894 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3w2zZ45XJpz9sNJ for ; Wed, 12 Apr 2017 19:45:48 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id CA2EF84E91; Wed, 12 Apr 2017 09:45:24 +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 jdar73O1nloq; Wed, 12 Apr 2017 09:45:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 108488842D; Wed, 12 Apr 2017 09:42:18 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 483E51C3F04 for ; Wed, 12 Apr 2017 09:40:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 467B787369 for ; Wed, 12 Apr 2017 09:40:30 +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 z5XVOvnaePz4 for ; Wed, 12 Apr 2017 09:40:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exchange.essensium.com (220.77.144.195.ipv4.evonet.be [195.144.77.220]) by fraxinus.osuosl.org (Postfix) with ESMTPS id A51FB8736F for ; Wed, 12 Apr 2017 09:40:12 +0000 (UTC) Received: from vandecaa-laptop.local.ess-mail.com (10.3.4.128) by beleexch01.local.ess-mail.com (10.3.7.8) with Microsoft SMTP Server (TLS) id 15.0.847.32; Wed, 12 Apr 2017 11:39:57 +0200 From: "Arnout Vandecappelle (Essensium/Mind)" To: Date: Wed, 12 Apr 2017 11:39:26 +0200 Message-ID: <20170412093928.1006-53-arnout@mind.be> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170412093928.1006-1-arnout@mind.be> References: <20170412093928.1006-1-arnout@mind.be> MIME-Version: 1.0 X-Originating-IP: [10.3.4.128] X-ClientProxiedBy: beleexch01.local.ess-mail.com (10.3.7.8) To beleexch01.local.ess-mail.com (10.3.7.8) Subject: [Buildroot] [PATCH 52/53] checkpolicy: rework host installation X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" checkpolicy has a pretty peculiar interpretation of DESTDIR and PREFIX. PREFIX simply defaults to $(DESTDIR)/usr, and is used in the rest of the build system. DESTDIR isn't used any further. For the host installation, we don't want the usr part, so set PREFIX instead of DESTDIR. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/checkpolicy/checkpolicy.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package/checkpolicy/checkpolicy.mk b/package/checkpolicy/checkpolicy.mk index d80bb792b4..f0cca593d3 100644 --- a/package/checkpolicy/checkpolicy.mk +++ b/package/checkpolicy/checkpolicy.mk @@ -31,17 +31,19 @@ endef HOST_CHECKPOLICY_DEPENDENCIES = host-libselinux host-flex host-bison -HOST_CHECKPOLICY_MAKE_OPTS = $(HOST_CONFIGURE_OPTS) \ +# PREFIX is used at build time to find host-libselinux +HOST_CHECKPOLICY_MAKE_OPTS = \ + $(HOST_CONFIGURE_OPTS) \ + PREFIX=$(HOST_DIR) \ LEX="$(HOST_DIR)/bin/flex" \ YACC="$(HOST_DIR)/bin/bison -y" -# DESTDIR is used at build time to find host-libselinux define HOST_CHECKPOLICY_BUILD_CMDS - $(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_CHECKPOLICY_MAKE_OPTS) DESTDIR=$(HOST_DIR) + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_CHECKPOLICY_MAKE_OPTS) endef define HOST_CHECKPOLICY_INSTALL_CMDS - $(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_CHECKPOLICY_MAKE_OPTS) DESTDIR=$(HOST_DIR) install + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) $(HOST_CHECKPOLICY_MAKE_OPTS) install endef $(eval $(generic-package))