From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 95CB68D99 for ; Wed, 2 Dec 2015 04:59:19 +0100 (CET) Received: by wmvv187 with SMTP id v187so236238746wmv.1 for ; Tue, 01 Dec 2015 19:59:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5fNTY/SxipNU+DfdTsLPaw3ddIsXvho7zBK8D60+bE4=; b=hbpDOxEVh3KAW9Lvq0HqQ/LYRXw/YIJPbND4eWNcO8YWvGsqJ3sIyr/jq3Vm1fApIa 4/2v4mehrvB4DEEGR0Kegt5ivvSOFYUVZA9peqFmll3IhHqHLHNn3PGOL55Ix19oEZDC 1Q7H0mTDJ3FxsV2QyFGu8OLrAyn9HLyOeKoIz02eS4ZzN2aAjE+hlbRN/HNrsOMbIl4j b1W663l4Udx29mkXlxAWXQkBTaYmQvQciRANR23QSAt0tBB6ttH24Sv5fZpkeUoLbaaa kwNFXxG/eWITKcJ1e88FMp89V2NxhQbEVkj1XyhcZcyUj5QczUKsljc5yOPavfXNvS0e Gmfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5fNTY/SxipNU+DfdTsLPaw3ddIsXvho7zBK8D60+bE4=; b=Y8HqBPsJ3ngtomIVUVClKB9f9VyEV6ehrfTAxrW31VW47AJB8F+qU9azPHAmF+cAQd 0/Tv0UhKNLBQZaEs+yVEbJfep3o2cgojuiFJvBsG0BgxyB4WifFBDdbUuzg1bhAt6iVN crXwnF3gByFQEmeqalz/95RWI3EU7ZrPBWHeqfwolUilgqykJK4vIYdV83ipYdVrsj61 wlaNJCJXfKC2iVTr2EBRHTNdXIFF3KqYa0inXiqDgj5nMhZ/oopD7h5XzOl/XleyqKfx fyIqBvyTValffZD7+hREE8Pv3GMnOofbyFHlDQrn1YjllpYDPPtVxPuZHrqkV8ys3t/8 cxUw== X-Gm-Message-State: ALoCoQlwDi3zWB9GMroR9m3iWVFWvRXBOe5Iiwyip2xvbgPu8oWKNfwZEg3B/gX8sFwDoXIUosCh X-Received: by 10.195.11.233 with SMTP id el9mr1449247wjd.145.1449028759464; Tue, 01 Dec 2015 19:59:19 -0800 (PST) Received: from XPS13.ibrowse.com ([93.158.52.3]) by smtp.gmail.com with ESMTPSA id h5sm783942wjz.21.2015.12.01.19.59.18 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Dec 2015 19:59:18 -0800 (PST) From: Thomas Monjalon To: dev@dpdk.org Date: Wed, 2 Dec 2015 04:57:48 +0100 Message-Id: <1449028676-19232-3-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.5.2 In-Reply-To: <1449028676-19232-1-git-send-email-thomas.monjalon@6wind.com> References: <1449028676-19232-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH 02/10] mk: move installation procedure in install rule X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 03:59:19 -0000 The real installation was called "binary install" and was done after the build when DESTDIR was specified. Remove this limitation and move the code in install rule only. Signed-off-by: Thomas Monjalon --- mk/rte.sdkbuild.mk | 16 ---------------- mk/rte.sdkinstall.mk | 21 ++++++++++++++++++--- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk index 38ec7bd..85f603c 100644 --- a/mk/rte.sdkbuild.mk +++ b/mk/rte.sdkbuild.mk @@ -29,8 +29,6 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# If DESTDIR variable is given, install binary dpdk - # # include rte.vars.mk if config file exists # @@ -61,20 +59,6 @@ CLEANDIRS = $(addsuffix _clean,$(ROOTDIRS-y) $(ROOTDIRS-n) $(ROOTDIRS-)) .PHONY: build build: $(ROOTDIRS-y) @echo "Build complete [$(RTE_TARGET)]" -ifneq ($(DESTDIR),) - $(Q)mkdir -p $(DESTDIR) - $(Q)tar -C $(RTE_SDK) -cf - mk scripts/*.sh | tar -C $(DESTDIR) -x \ - --keep-newer-files --warning=no-ignore-newer -f - - $(Q)mkdir -p $(DESTDIR)/`basename $(RTE_OUTPUT)` - $(Q)tar -C $(RTE_OUTPUT) -chf - \ - --exclude app --exclude hostapp --exclude build \ - --exclude Makefile --exclude .depdirs . | \ - tar -C $(DESTDIR)/`basename $(RTE_OUTPUT)` -x --keep-newer-files \ - --warning=no-ignore-newer -f - - $(Q)install -D $(RTE_OUTPUT)/app/testpmd \ - $(DESTDIR)/`basename $(RTE_OUTPUT)`/app/testpmd - @echo Installation in $(DESTDIR) complete -endif .PHONY: clean clean: $(CLEANDIRS) diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk index e8355eb..ed3ed86 100644 --- a/mk/rte.sdkinstall.mk +++ b/mk/rte.sdkinstall.mk @@ -37,9 +37,8 @@ O ?= . # The build directory is T and may be prepended with O BUILD_DIR := $O/$T -.PHONY: install -install: - @echo ================== Installing $T +.PHONY: pre_install +pre_install: $(Q)if [ ! -f $(BUILD_DIR)/.config ]; then \ $(MAKE) config T=$T O=$(BUILD_DIR); \ elif cmp -s $(BUILD_DIR)/.config.orig $(BUILD_DIR)/.config; then \ @@ -56,3 +55,19 @@ install: echo "Using local configuration"; \ fi $(Q)$(MAKE) all O=$(BUILD_DIR) + +.PHONY: install +install: pre_install + @echo ================== Installing $(DESTDIR) + $(Q)mkdir -p $(DESTDIR) + $(Q)tar -C $(RTE_SDK) -cf - mk scripts/*.sh | tar -C $(DESTDIR) -x \ + --keep-newer-files --warning=no-ignore-newer -f - + $(Q)mkdir -p $(DESTDIR)/$T + $(Q)tar -C $(BUILD_DIR) -chf - \ + --exclude app --exclude hostapp --exclude build \ + --exclude Makefile --exclude .depdirs . | \ + tar -C $(DESTDIR)/$T -x --keep-newer-files \ + --warning=no-ignore-newer -f - + $(Q)install -D $(BUILD_DIR)/app/testpmd \ + $(DESTDIR)/$T/app/testpmd + @echo Installation in $(DESTDIR) complete -- 2.5.2