From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 070E98E82 for ; Thu, 3 Dec 2015 06:03:34 +0100 (CET) Received: by wmec201 with SMTP id c201so9409995wme.0 for ; Wed, 02 Dec 2015 21:03:34 -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=nHvS3Kcx8RGDhxflE+qnRshd55TwvNlwyXC+eY2L5Ds=; b=arObK4/bH8+COJy3HIMc6J5JPaYnUCaeOAh3qBjkOiw6qYDPVCyPDJFeQx6kMvGGpA d25fdRpL0g4OpCwzrJdgvtQD+xXvUsxdrhPxJ/Cw0EdeTgdy387vxecPadtN5AjXX3Lu cHPS6A5QXzmlKDGQ80/ZX1nfI/Ax8xBoUgc3+BXwtAQoncdzOmwQ3BMe+1FgpQVhA1T3 xx+dNXqkc+fpqD0CG2NnNk6O/gW68UWO3fr3fUjbWgpv57vQ1p7Fp1bTJBpvTPYWBq9o dPAwG2j3EEuWJCOQ7jwnIXhOIgzEo8JNxtpQvpLtdCkFsRCwrBdKrFTLxg9qW3oUMRdT QOXw== 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=nHvS3Kcx8RGDhxflE+qnRshd55TwvNlwyXC+eY2L5Ds=; b=j6/QS3wMAM6Fk0k9TdGwvBterX9dWMj4yruQwoqvxzKTjf9+gi2525Cb0sMXgEgY58 uEH36YC1hWlIepV3NkrdLpxUPz1631SkOfv64iEZq3kNDDeDnl5VMb7jWqe6j8U8e5zH pE2ObfAZksGTFXHff8SMHgV11hsc+IirIxyeCU+4XcOSY+KYRNVUlu9r+1FnJb22qGn2 uz/EAC4aZQjaDDEjidOS1Ag3n2tfdLKIWf+3fpGsoLFQPnaTupZJn3Yq6y9EYOmb2tfX /UkQd8Ce8iyiCHclqBGOMfoD2QkL9ei1FQ91Lb7/2fdjrjgQ4GFktICvftFeYDbBFsMc ihrA== X-Gm-Message-State: ALoCoQmP42Wst92PhdJuTQMtqj6P3cpMd+ie+vAJmOd6ZgvDY8XF2z4IlL89P2YmTWxiqju8UfYg X-Received: by 10.28.173.131 with SMTP id w125mr49946888wme.41.1449119013885; Wed, 02 Dec 2015 21:03:33 -0800 (PST) Received: from XPS13.ibrowse.com ([93.158.46.55]) by smtp.gmail.com with ESMTPSA id gl4sm5720379wjd.17.2015.12.02.21.03.32 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Dec 2015 21:03:33 -0800 (PST) From: Thomas Monjalon To: dev@dpdk.org Date: Thu, 3 Dec 2015 06:02:03 +0100 Message-Id: <1449118929-19962-7-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.5.2 In-Reply-To: <1449118929-19962-1-git-send-email-thomas.monjalon@6wind.com> References: <1449028676-19232-1-git-send-email-thomas.monjalon@6wind.com> <1449118929-19962-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH v2 06/12] mk: split 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: Thu, 03 Dec 2015 05:03:34 -0000 Provides new sub-rules to install runtime and sdk separately. The build directory must be changed from BUILD_DIR to O in install rules to avoid a bad recursive effect (O being BUILD_DIR being O + T). Suggested-by: Mario Carrillo Signed-off-by: Thomas Monjalon --- mk/rte.sdkinstall.mk | 18 ++++++++++++------ mk/rte.sdkroot.mk | 2 ++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk index 6a7aedd..509b50e 100644 --- a/mk/rte.sdkinstall.mk +++ b/mk/rte.sdkinstall.mk @@ -93,25 +93,31 @@ ifeq ($(DESTDIR)$(if $T,,+),) @echo Installation cannot run with T defined and DESTDIR undefined else @echo ================== Installing $(DESTDIR)$(prefix)/ + $(Q)$(MAKE) O=$(BUILD_DIR) install-runtime + $(Q)$(MAKE) O=$(BUILD_DIR) install-sdk + @echo Installation in $(DESTDIR)$(prefix)/ complete +endif + +install-runtime: $(Q)$(call rte_mkdir, $(DESTDIR)$(libdir)) - $(Q)cp -a $(BUILD_DIR)/lib/* $(DESTDIR)$(libdir) + $(Q)cp -a $O/lib/* $(DESTDIR)$(libdir) $(Q)$(call rte_mkdir, $(DESTDIR)$(bindir)) - $(Q)tar -cf - -C $(BUILD_DIR) app --exclude 'app/*.map' \ + $(Q)tar -cf - -C $O app --exclude 'app/*.map' \ --exclude 'app/cmdline*' --exclude app/test \ --exclude app/testacl --exclude app/testpipeline | \ tar -xf - -C $(DESTDIR)$(bindir) --strip-components=1 \ --keep-newer-files --warning=no-ignore-newer $(Q)$(call rte_mkdir, $(DESTDIR)$(datadir)) $(Q)cp -a $(RTE_SDK)/tools $(DESTDIR)$(datadir) + +install-sdk: $(Q)$(call rte_mkdir, $(DESTDIR)$(includedir)) - $(Q)tar -chf - -C $(BUILD_DIR) include | \ + $(Q)tar -chf - -C $O include | \ tar -xf - -C $(DESTDIR)$(includedir) --strip-components=1 \ --keep-newer-files --warning=no-ignore-newer $(Q)$(call rte_mkdir, $(DESTDIR)$(sdkdir)) $(Q)cp -a $(RTE_SDK)/{mk,scripts} $(DESTDIR)$(sdkdir) $(Q)$(call rte_mkdir, $(DESTDIR)$(targetdir)) - $(Q)cp -a $(BUILD_DIR)/.config $(DESTDIR)$(targetdir) + $(Q)cp -a $O/.config $(DESTDIR)$(targetdir) $(Q)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(targetdir)/include) $(Q)$(call rte_symlink, $(DESTDIR)$(libdir), $(DESTDIR)$(targetdir)/lib) - @echo Installation in $(DESTDIR)$(prefix)/ complete -endif diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk index 9fdecf4..ce6b0fc 100644 --- a/mk/rte.sdkroot.mk +++ b/mk/rte.sdkroot.mk @@ -96,6 +96,8 @@ test fast_test ring_test mempool_test perf_test coverage: .PHONY: install install: $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk $@ +install-%: + $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk $@ .PHONY: doc help doc: doc-all -- 2.5.2