summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorThomas Monjalon <thomas.monjalon@6wind.com>2015-12-01 23:29:48 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-12-06 15:41:04 +0100
commit6efca1e9f87305b08ee1e26d817a5c770fa444fa (patch)
tree23ca34de873a884485f2d68bbae1fbcca2d677b3 /mk
parentfae202e2e21cb50cd4df4b1f5688eb5bfeb4a771 (diff)
downloaddpdk-6efca1e9f87305b08ee1e26d817a5c770fa444fa.zip
dpdk-6efca1e9f87305b08ee1e26d817a5c770fa444fa.tar.gz
dpdk-6efca1e9f87305b08ee1e26d817a5c770fa444fa.tar.xz
mk: split install rule
Provides new sub-rules to install runtime and sdk separately. The build directory must be changed from BUILD_DIR to O in install rules to avoid a bad recursive effect (O being BUILD_DIR being O + T). Suggested-by: Mario Carrillo <mario.alfredo.c.arevalo@intel.com> 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.mk18
-rw-r--r--mk/rte.sdkroot.mk2
2 files changed, 14 insertions, 6 deletions
diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk
index dc57baf..ec093d3 100644
--- a/mk/rte.sdkinstall.mk
+++ b/mk/rte.sdkinstall.mk
@@ -93,25 +93,31 @@ ifeq ($(DESTDIR)$(if $T,,+),)
@echo Installation cannot run with T defined and DESTDIR undefined
else
@echo ================== Installing $(DESTDIR)$(prefix)/
+ $(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-runtime
+ $(Q)$(MAKE) O=$(RTE_OUTPUT) T= install-sdk
+ @echo Installation in $(DESTDIR)$(prefix)/ complete
+endif
+
+install-runtime:
$(Q)$(call rte_mkdir, $(DESTDIR)$(libdir))
- $(Q)cp -a $(RTE_OUTPUT)/lib/* $(DESTDIR)$(libdir)
+ $(Q)cp -a $O/lib/* $(DESTDIR)$(libdir)
$(Q)$(call rte_mkdir, $(DESTDIR)$(bindir))
- $(Q)tar -cf - -C $(RTE_OUTPUT) app --exclude 'app/*.map' \
+ $(Q)tar -cf - -C $O app --exclude 'app/*.map' \
--exclude 'app/cmdline*' --exclude app/test \
--exclude app/testacl --exclude app/testpipeline | \
tar -xf - -C $(DESTDIR)$(bindir) --strip-components=1 \
--keep-newer-files --warning=no-ignore-newer
$(Q)$(call rte_mkdir, $(DESTDIR)$(datadir))
$(Q)cp -a $(RTE_SDK)/tools $(DESTDIR)$(datadir)
+
+install-sdk:
$(Q)$(call rte_mkdir, $(DESTDIR)$(includedir))
- $(Q)tar -chf - -C $(RTE_OUTPUT) include | \
+ $(Q)tar -chf - -C $O include | \
tar -xf - -C $(DESTDIR)$(includedir) --strip-components=1 \
--keep-newer-files --warning=no-ignore-newer
$(Q)$(call rte_mkdir, $(DESTDIR)$(sdkdir))
$(Q)cp -a $(RTE_SDK)/{mk,scripts} $(DESTDIR)$(sdkdir)
$(Q)$(call rte_mkdir, $(DESTDIR)$(targetdir))
- $(Q)cp -a $(RTE_OUTPUT)/.config $(DESTDIR)$(targetdir)
+ $(Q)cp -a $O/.config $(DESTDIR)$(targetdir)
$(Q)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(targetdir)/include)
$(Q)$(call rte_symlink, $(DESTDIR)$(libdir), $(DESTDIR)$(targetdir)/lib)
- @echo Installation in $(DESTDIR)$(prefix)/ complete
-endif
diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk
index 533afe9..2424dce 100644
--- a/mk/rte.sdkroot.mk
+++ b/mk/rte.sdkroot.mk
@@ -97,6 +97,8 @@ test fast_test ring_test mempool_test perf_test coverage:
install:
$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk pre_install
$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk $@
+install-%:
+ $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkinstall.mk $@
.PHONY: doc help
doc: doc-all