From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH 05/10] mk: split install rule Date: Wed, 2 Dec 2015 04:57:51 +0100 Message-ID: <1449028676-19232-6-git-send-email-thomas.monjalon@6wind.com> References: <1449028676-19232-1-git-send-email-thomas.monjalon@6wind.com> To: dev@dpdk.org Return-path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 304258E74 for ; Wed, 2 Dec 2015 04:59:24 +0100 (CET) Received: by wmww144 with SMTP id w144so39975404wmw.0 for ; Tue, 01 Dec 2015 19:59:24 -0800 (PST) In-Reply-To: <1449028676-19232-1-git-send-email-thomas.monjalon@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 9b4303a..5585974 100644 --- a/mk/rte.sdkinstall.mk +++ b/mk/rte.sdkinstall.mk @@ -88,24 +88,30 @@ 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 $(BUILD_DIR)/.config $(DESTDIR)$(sdkdir) + $(Q)cp -a $O/.config $(DESTDIR)$(sdkdir) $(Q)cp -a $(RTE_SDK)/{mk,scripts} $(DESTDIR)$(sdkdir) $(Q)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(sdkdir)/include) $(Q)$(call rte_symlink, $(DESTDIR)$(libdir), $(DESTDIR)$(sdkdir)/lib) - @echo Installation in $(DESTDIR)$(prefix)/ complete -endif diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk index 18180fa..dbb7bce 100644 --- a/mk/rte.sdkroot.mk +++ b/mk/rte.sdkroot.mk @@ -100,6 +100,8 @@ testall: .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