From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 7E8988D85 for ; Wed, 2 Dec 2015 04:59:18 +0100 (CET) Received: by wmec201 with SMTP id c201so234690521wme.0 for ; Tue, 01 Dec 2015 19:59:18 -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=5NmJZU7RhqYvBhMssmSFtN/TqqFt+CMopeEg65iz7RM=; b=v33h5fMlX1nHVnHkElDIzutSZlIOQ4SAU4p846Dtws8lRQainTc9UNke/uoPiN+pqn dVNY6kSZ8QjaGWEpzUp1LlC2TuHm63KTXp6vhW2kJB1gUX3jHFhZfnnB9dybOb95I29l VLx4CIKHIhIo9imQnxaKo9mOfIeHWn3cOjvvXqwYN3lzg9pEp8D4bTNLlWxL266ah4Ig AjJieyIuoY2fmBL+dFjWVnxtkibakdr1OFMgmN6XRs4QeWRjHHSzbVe/21T4pqdxAS1t dO8xJuIZPakOVvn14iXKVZXBrBQwslAySCgsrT9Qq7MA615U4bSPKJWUKsqFBztHyi+k i01g== 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=5NmJZU7RhqYvBhMssmSFtN/TqqFt+CMopeEg65iz7RM=; b=haeOIZ1gi7V6yXw7Sf5TgzJGyC5ed4ntiuBWXTOpAdEyhksw4AqYX94IWaMsPr4qrK wErAwQ79O1cgm0I/dZ6x1er3sklARnTjWVWnQ89L6nhc9Wc/1FxrTaYFmwZpCEYmSf7z P5eNZUes/h0mGA6onL21LkiEB6oIkxO9YIDihdjvkE9i5pidsVyE/K7y/VVPXw+4FEXg cw0q3sf0g5eynN5USiaq5VfQvgxR9EF2LWcZ4A8kjhLE1zqxIRkplRh1H/JOJl3ZWCy+ KFacJ/qDj+B+uFJL3pOYtcCPLf2d2+wVJ6NHOmQjweVMyrH8mMFWwN4upY43a9kAE0wg tsnQ== X-Gm-Message-State: ALoCoQmwLxx2M6YdLfoAcY8QhT+4axtNfmLBKgh9A+W4xxjk+RMr5Mtr3SxhfpxGnudh9Wn64Wub X-Received: by 10.194.59.108 with SMTP id y12mr1476441wjq.33.1449028758374; Tue, 01 Dec 2015 19:59:18 -0800 (PST) Received: from XPS13.ibrowse.com ([93.158.52.3]) by smtp.gmail.com with ESMTPSA id h5sm783942wjz.21.2015.12.01.19.59.17 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Dec 2015 19:59:17 -0800 (PST) From: Thomas Monjalon To: dev@dpdk.org Date: Wed, 2 Dec 2015 04:57:47 +0100 Message-Id: <1449028676-19232-2-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.5.2 In-Reply-To: <1449028676-19232-1-git-send-email-thomas.monjalon@6wind.com> References: <1449028676-19232-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH 01/10] mk: remove multi-target install 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: Wed, 02 Dec 2015 03:59:18 -0000 The multi-target install create some subdirectories with the target name which is not standard for a "make install" procedure. The uninstall procedure cannot be applied properly (without removing all files in a directory). It would need to pre-compute paths. As it is a packaging issue, it is removed from the build system capabilities. Signed-off-by: Thomas Monjalon --- doc/build-sdk-quick.txt | 5 ++-- mk/rte.sdkinstall.mk | 61 +++++++++++++------------------------------------ mk/rte.sdkroot.mk | 4 ++-- 3 files changed, 20 insertions(+), 50 deletions(-) diff --git a/doc/build-sdk-quick.txt b/doc/build-sdk-quick.txt index bf18b48..b5f752e 100644 --- a/doc/build-sdk-quick.txt +++ b/doc/build-sdk-quick.txt @@ -5,8 +5,7 @@ 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) and install in DESTDIR - uninstall remove all installed targets + install configure, build and install a target in DESTDIR examples build examples for given targets (T=) examples_clean clean examples for given targets (T=) Build variables @@ -20,6 +19,6 @@ Build variables 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 + T target template - used with config or install format: templates in config/defconfig_* diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk index 86c98a5..e8355eb 100644 --- a/mk/rte.sdkinstall.mk +++ b/mk/rte.sdkinstall.mk @@ -30,58 +30,29 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Build directory is given with O= -ifdef O -BUILD_DIR=$(O) -else -BUILD_DIR=. -endif +O ?= . -# Targets to install can be specified in command line. It can be a -# target name or a name containing jokers "*". Example: -# x86_64-native-*-gcc -ifndef T -T=* -endif - -# -# install: build sdk for all supported targets -# -INSTALL_CONFIGS := $(patsubst $(RTE_SRCDIR)/config/defconfig_%,%,\ - $(wildcard $(RTE_SRCDIR)/config/defconfig_$(T))) -INSTALL_TARGETS := $(addsuffix _install,\ - $(filter-out %~,$(INSTALL_CONFIGS))) +# Configuration, compilation and installation can be done at once +# with make install T= +# The build directory is T and may be prepended with O +BUILD_DIR := $O/$T .PHONY: install -install: $(INSTALL_TARGETS) - -%_install: - @echo ================== Installing $* - $(Q)if [ ! -f $(BUILD_DIR)/$*/.config ]; then \ - $(MAKE) config T=$* O=$(BUILD_DIR)/$*; \ - elif cmp -s $(BUILD_DIR)/$*/.config.orig $(BUILD_DIR)/$*/.config; then \ - $(MAKE) config T=$* O=$(BUILD_DIR)/$*; \ +install: + @echo ================== Installing $T + $(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 \ + $(MAKE) config T=$T O=$(BUILD_DIR); \ else \ - if [ -f $(BUILD_DIR)/$*/.config.orig ] ; then \ - tmp_build=$(BUILD_DIR)/$*/.config.tmp; \ - $(MAKE) config T=$* O=$$tmp_build; \ - if ! cmp -s $(BUILD_DIR)/$*/.config.orig $$tmp_build/.config ; then \ + if [ -f $(BUILD_DIR)/.config.orig ] ; then \ + tmp_build=$(BUILD_DIR)/.config.tmp; \ + $(MAKE) config T=$T O=$$tmp_build; \ + if ! cmp -s $(BUILD_DIR)/.config.orig $$tmp_build/.config ; then \ echo "Conflict: local config and template config have both changed"; \ exit 1; \ fi; \ fi; \ echo "Using local configuration"; \ fi - $(Q)$(MAKE) all O=$(BUILD_DIR)/$* - -# -# uninstall: remove all built sdk -# -UNINSTALL_TARGETS := $(addsuffix _uninstall,\ - $(filter-out %~,$(INSTALL_CONFIGS))) - -.PHONY: uninstall -uninstall: $(UNINSTALL_TARGETS) - -%_uninstall: - @echo ================== Uninstalling $* - $(Q)rm -rf $(BUILD_DIR)/$* + $(Q)$(MAKE) all O=$(BUILD_DIR) diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk index e8423b0..18180fa 100644 --- a/mk/rte.sdkroot.mk +++ b/mk/rte.sdkroot.mk @@ -97,8 +97,8 @@ test fast_test ring_test mempool_test perf_test coverage: testall: $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdktestall.mk $@ -.PHONY: install uninstall -install uninstall: +.PHONY: install +install: $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk $@ .PHONY: doc help -- 2.5.2