From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id 776458E64 for ; Thu, 3 Dec 2015 06:03:29 +0100 (CET) Received: by wmuu63 with SMTP id u63so5940470wmu.0 for ; Wed, 02 Dec 2015 21:03:29 -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=843SDobx6xieu5rW3AlG0mT3khh/dhvaKmASkfu/VRA=; b=pixUy+HDTr8tfmkc3KxaKqoHtS7gKvcxumwsin0Id9ilkMzey5JP4fBVG2APZQ0Fac pV7V+x13n5gV6astPBed8vlEdBNEOJSZvbtJ0r1pIrMJ0cJ9pAvW0mRykf1UaBerXh87 zU5H69TqByOf0H1xEewwa8NHiU0cMitaru50JLOaErhlcbVGZd45QMf21xLlfWfR2Wth HADrpSXVvlOPtkgKGiq2IoF/ccuVQaIf2DnrTmAsTMa87WaRzdQE12UIxwx2bZXnJFkf LCK8+p+zBB8BXddzuOb1qEiG5SjUynKBEB0FqT9BBsRrqTdXyxf7u2oInXK2iK6BAGgs qUBg== 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=843SDobx6xieu5rW3AlG0mT3khh/dhvaKmASkfu/VRA=; b=Uqm94fC4AjQ580tKFl2FRfcKIHEIU5p9p2uKVeh7FdYeeQUcUtrhxCZfXz1lk+MZVf sqQsQpeCP+yFb7RerinSlznUwhQ18MfQ03+mog/YGg0SgedDidHp530eFOFEiVr/qTcu 3ZnTdQIGXgufHw85BsqBny7bKgncfNDWxh5qpbtBmLxTkaBuKclSDaeizCsO3mf756v6 cwlHw9T2VHDU1+mvjpR7CKdfeIIYzPRbPhqi9bGIJ/ilcqRyYx2HnhMK75FU8WWGSI5i eKM62H15bwr1RlJqRns3ZsIYOnWZoX/bZl6Klpym0bxw9AKjPI59sZ3kkmPsY8WZQAWF NkyA== X-Gm-Message-State: ALoCoQnsJZIBI0An1i/OFMxCDQKdTbO4D09YCjbUSK14tpfW+BhYStwUrY9q3NjpprOEkq9J8G0I X-Received: by 10.28.16.133 with SMTP id 127mr49962405wmq.24.1449119009339; Wed, 02 Dec 2015 21:03:29 -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.28 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 02 Dec 2015 21:03:28 -0800 (PST) From: Thomas Monjalon To: dev@dpdk.org Date: Thu, 3 Dec 2015 06:02:00 +0100 Message-Id: <1449118929-19962-4-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 03/12] 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: Thu, 03 Dec 2015 05:03:29 -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 3e6e8ca..54ea501 100644 --- a/mk/rte.sdkinstall.mk +++ b/mk/rte.sdkinstall.mk @@ -36,9 +36,8 @@ 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 \ @@ -55,3 +54,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