From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id D5E728E7E for ; Thu, 3 Dec 2015 14:47:03 +0100 (CET) Received: by wmuu63 with SMTP id u63so21791628wmu.0 for ; Thu, 03 Dec 2015 05:47:03 -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=GFed/xhgQlTs+8UBFq9JBnDvAGg3eouEhayXixgIYfc=; b=Y+/UEkIiNqqq6ELnqmhsMVNNAJFQun9DKNCrpbPgisIvtFwURLs54bBRFoTW+Xhew1 Jis0Bi1/yMr6BuPXAbx8H1MGXya4EplcOwnLbkGLW7mEtrRr0yk5eROhEy8S+j2u4IWW hXWJd8TuUz4e3QXanxjnvlO/nHm2jBFb8njP8ajj5CbL6KG7UfIinfDdH0NX7/3VwfNp J7yVZB8iBi83qC5FTvUn+MU0a+REHmYvuuh1PdZwhztm5WT1P/NLMHzWSbVeruNjZSep Ydmt9v9ODyYg9r1lzm5iOJ5Gf9GfKKp9vQYd7A6/BXOZIek/enYgCkKWSHb9u6pwrcFP /9YQ== 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=GFed/xhgQlTs+8UBFq9JBnDvAGg3eouEhayXixgIYfc=; b=GNANO2z4Yn0Vp5+oV+nytdwhEVKtHurXSnYoTr2CadMK7VMQhipibLaH0ipZgNTTAu OK9EHcusomABAvqkdLxvqOZHUB5NHtt7m7VLLLUI4xHeFhzT+KI4NDpTP1nCmM/IgZgH dHcdPx/YsAymZmGm6rkc+mkHOF/8vb0LklJq7ZpZPiPkiRHGN2nk37laCH7FNTKbrKkk fuTouwcZO2dGTPuOrqajXJsDUSPa3caEWDCvR7kWdDH60o46G3kj2+J6TPANyBKU4LFl xkYFN28Fi2myEDCDmk2qAGELC7ZqMTEgCQ0HAJOsO+tU+P2qeZ2pOWIGKLRYhhdFMnxO cdUg== X-Gm-Message-State: ALoCoQlIT2t+7Mvjq/mzd7hCMUeaczwsuFRdwv8kLUX/LoLNQyF96WoK+YfGbWH7CNFE6dy1q8BR X-Received: by 10.194.142.45 with SMTP id rt13mr10834475wjb.45.1449150423759; Thu, 03 Dec 2015 05:47:03 -0800 (PST) Received: from XPS13.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id k133sm8063912wmg.18.2015.12.03.05.47.02 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Dec 2015 05:47:03 -0800 (PST) From: Thomas Monjalon To: dev@dpdk.org Date: Thu, 3 Dec 2015 14:45:32 +0100 Message-Id: <1449150340-21984-6-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.5.2 In-Reply-To: <1449150340-21984-1-git-send-email-thomas.monjalon@6wind.com> References: <1449118929-19962-1-git-send-email-thomas.monjalon@6wind.com> <1449150340-21984-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH v3 05/13] mk: introduce new install syntax 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 13:47:04 -0000 The old install command was: make install T=x86_64-native-linuxapp-gcc DESTDIR=install It still works and can be replaced by these more standard commands: make config T=x86_64-native-linuxapp-gcc 0=x86_64-native-linuxapp-gcc make O=x86_64-native-linuxapp-gcc make install O=x86_64-native-linuxapp-gcc prefix= DESTDIR=install It means the "make install" do not perform any compilation anymore when T is not used. It is done only in pre_install to keep compatibility with the old syntax based on T= option. The default prefix /usr/local is empty in the T= case which is used only for a local install. Signed-off-by: Thomas Monjalon Acked-by: Panu Matilainen --- doc/build-sdk-quick.txt | 7 ++++--- doc/guides/prog_guide/dev_kit_root_make_help.rst | 4 +--- mk/rte.sdkinstall.mk | 12 ++++++++++++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/doc/build-sdk-quick.txt b/doc/build-sdk-quick.txt index 662ef63..acd1bfe 100644 --- a/doc/build-sdk-quick.txt +++ b/doc/build-sdk-quick.txt @@ -5,7 +5,8 @@ Build commands all same as build (default rule) build build in a configured directory clean remove files but keep configuration - install configure, build and install a target in DESTDIR + install T= configure, build and install a target in DESTDIR + install install optionally staged in DESTDIR examples build examples for given targets (T=) examples_clean clean examples for given targets (T=) Build variables @@ -17,8 +18,8 @@ Build variables CROSS toolchain prefix V verbose D debug dependencies - O build directory (default: build/ - install default: ./) - DESTDIR second-stage install directory + O build directory (default: build/ - install T= default: ./) + DESTDIR staging install directory prefix root install directory T target template - used with config or install format: diff --git a/doc/guides/prog_guide/dev_kit_root_make_help.rst b/doc/guides/prog_guide/dev_kit_root_make_help.rst index b0429d8..fb3520e 100644 --- a/doc/guides/prog_guide/dev_kit_root_make_help.rst +++ b/doc/guides/prog_guide/dev_kit_root_make_help.rst @@ -107,8 +107,6 @@ Install Targets * Install - Build the DPDK binary. - The name of the target to install is specified using T=mytarget. The list of available targets are in $(RTE_SDK)/config (remove the defconfig\_ prefix). The GNU standards variables may be used: @@ -119,7 +117,7 @@ Install Targets .. code-block:: console - make install T=x86_64-native-linuxapp-gcc prefix=/usr + make install DESTDIR=myinstall prefix=/usr Test Targets ------------ diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk index 3201b5b..dc57baf 100644 --- a/mk/rte.sdkinstall.mk +++ b/mk/rte.sdkinstall.mk @@ -33,11 +33,21 @@ # Configuration, compilation and installation can be done at once # with make install T= +ifdef T # config, build and install combined # The build directory is T and may be prepended with O O ?= . RTE_OUTPUT := $O/$T +else # standard install +# Build directory is given with O= +O ?= build +RTE_OUTPUT := $O +endif +ifdef T # defaults with T= will install an almost flat staging tree +export prefix ?= +else prefix ?= /usr/local +endif exec_prefix ?= $(prefix) bindir ?= $(exec_prefix)/bin libdir ?= $(exec_prefix)/lib @@ -58,6 +68,7 @@ rte_symlink = ln -snf $$($(RTE_SDK)/scripts/relpath.sh $1 $(dir $2)) $2 .PHONY: pre_install pre_install: +ifdef T $(Q)if [ ! -f $(RTE_OUTPUT)/.config ]; then \ $(MAKE) config O=$(RTE_OUTPUT); \ elif cmp -s $(RTE_OUTPUT)/.config.orig $(RTE_OUTPUT)/.config; then \ @@ -74,6 +85,7 @@ pre_install: echo "Using local configuration"; \ fi $(Q)$(MAKE) all O=$(RTE_OUTPUT) +endif .PHONY: install install: -- 2.5.2