From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by dpdk.org (Postfix) with ESMTP id D8AAA592F for ; Fri, 26 Jul 2013 15:13:38 +0200 (CEST) Received: by mail-wi0-f171.google.com with SMTP id hj3so836321wib.4 for ; Fri, 26 Jul 2013 06:14:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references:x-gm-message-state; bh=wS+UEV6lSV/Le3lHkziufl9xLOvzLDkdmU3pyvnr8pw=; b=EzQerz+LRjZxzFKFOZmMxuA1fdSW0pZtI860ch9rjaHzTKYg9WG064+1RuLmEI91fk ze1rWSCQzsWNNPVGadj+xRgbbU/A79gH3ALkEoN5AagIIFxgpk0ui0hDtpOim4zLjnnM 35LGzJBV3KcIgtR9abDvdHia6KIGPaYfQA1MHxT4Cc1is530CZ9unW7aP23NNcHshYgm Y3Zjubk99D1yVPs3gJmU8qLLruWJwEINDv1dYQ7OCmiU8/+pwixU6eRsbl09qNX2tefP ZUBDczwwXBqB1bTu5Avx85eFxqWgebTf9Ta0ieD7aEe790pz/2KU04VYXQr2P6e0nK5U uGBg== X-Received: by 10.195.13.202 with SMTP id fa10mr33892730wjd.14.1374844441725; Fri, 26 Jul 2013 06:14:01 -0700 (PDT) Received: from 6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id x6sm4723347wiy.8.2013.07.26.06.13.58 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 26 Jul 2013 06:14:00 -0700 (PDT) Received: by 6wind.com (sSMTP sendmail emulation); Fri, 26 Jul 2013 15:13:58 +0200 From: Thomas Monjalon To: dev@dpdk.org Date: Fri, 26 Jul 2013 15:13:45 +0200 Message-Id: <863b5971dfc7b6dbe8057529b967d7e635092f83.1374843652.git.thomas.monjalon@6wind.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQmUdgVkI3R+msef8/nQYf3rnE+QzH7gboY8rWXdCKiM/emAm+z3GkiAK1yRHxyS1l1tQOXz Subject: [dpdk-dev] [PATCH 3/3] mk: allow to specify DESTDIR in build 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: Fri, 26 Jul 2013 13:13:39 -0000 From: Olivier Matz This will install the binary sdk (bin + modules + libs + headers + mk) in the specified directory. This directory can be used as RTE_SDK by external applications. Signed-off-by: Olivier Matz Acked-by: Thomas Monjalon --- doc/build-sdk-quick.txt | 13 +++++++------ mk/rte.sdkbuild.mk | 16 ++++++++++++++++ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/doc/build-sdk-quick.txt b/doc/build-sdk-quick.txt index d66f0d5..18b0ee6 100644 --- a/doc/build-sdk-quick.txt +++ b/doc/build-sdk-quick.txt @@ -5,16 +5,17 @@ Build commands all same as build (default rule) build build in a configured directory clean remove files but keep configuration - install build many targets (wildcard allowed) + install build many targets (wildcard allowed) and install in DESTDIR uninstall remove all installed targets Build variables - CROSS toolchain prefix EXTRA_CPPFLAGS preprocessor options EXTRA_CFLAGS compiler options EXTRA_LDFLAGS linker options - V verbose - D debug dependencies - O output directory (default: build/ - install default: ./) - T target template (install default: *) - used with config or install + CROSS toolchain prefix + V verbose + D debug dependencies + O build directory (default: build/ - install default: ./) + DESTDIR second-stage install directory + T target template (install default: *) - used with config or install format: templates in config/defconfig_* diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk index 5ea4202..087d3ab 100644 --- a/mk/rte.sdkbuild.mk +++ b/mk/rte.sdkbuild.mk @@ -30,6 +30,8 @@ # 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 # @@ -60,6 +62,20 @@ CLEANDIRS = $(addsuffix _clean,$(ROOTDIRS-y) $(ROOTDIRS-n) $(ROOTDIRS-)) .PHONY: build build: $(ROOTDIRS-y) @echo Build complete +ifneq ($(DESTDIR),) + $(Q)mkdir -p $(DESTDIR) + $(Q)tar -C $(RTE_SDK) -cf - mk | 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) -- 1.7.10.4