summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorThomas Monjalon <thomas.monjalon@6wind.com>2015-12-01 08:36:00 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-12-06 15:41:04 +0100
commit27f356c48da352287c4fab72a48d889a77b88db4 (patch)
tree715f6df5f98c8a4e1f0a3ad25cb2101eddb948f0 /mk
parentfbae3cdd20d2752acd22d8bd0b28bd9e06dbd141 (diff)
downloaddpdk-27f356c48da352287c4fab72a48d889a77b88db4.zip
dpdk-27f356c48da352287c4fab72a48d889a77b88db4.tar.gz
dpdk-27f356c48da352287c4fab72a48d889a77b88db4.tar.xz
mk: remove multi-target install
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. The variable BUILD_DIR is also renamed to RTE_OUTPUT used in other files. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Panu Matilainen <pmatilai@redhat.com>
Diffstat (limited to 'mk')
-rw-r--r--mk/rte.sdkinstall.mk62
-rw-r--r--mk/rte.sdkroot.mk4
2 files changed, 18 insertions, 48 deletions
diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk
index 86c98a5..0b80104 100644
--- a/mk/rte.sdkinstall.mk
+++ b/mk/rte.sdkinstall.mk
@@ -29,59 +29,29 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# 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
+# Configuration, compilation and installation can be done at once
+# with make install T=<config>
-# 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)))
+# The build directory is T and may be prepended with O
+O ?= .
+RTE_OUTPUT := $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 $(RTE_OUTPUT)/.config ]; then \
+ $(MAKE) config O=$(RTE_OUTPUT); \
+ elif cmp -s $(RTE_OUTPUT)/.config.orig $(RTE_OUTPUT)/.config; then \
+ $(MAKE) config O=$(RTE_OUTPUT); \
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 $(RTE_OUTPUT)/.config.orig ] ; then \
+ tmp_build=$(RTE_OUTPUT)/.config.tmp; \
+ $(MAKE) config O=$$tmp_build; \
+ if ! cmp -s $(RTE_OUTPUT)/.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=$(RTE_OUTPUT)
diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk
index 0e97308..9fdecf4 100644
--- a/mk/rte.sdkroot.mk
+++ b/mk/rte.sdkroot.mk
@@ -93,8 +93,8 @@ config showconfigs showversion:
test fast_test ring_test mempool_test perf_test coverage:
$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdktest.mk $@
-.PHONY: install uninstall
-install uninstall:
+.PHONY: install
+install:
$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk $@
.PHONY: doc help