- @echo ================== Installing $(DESTDIR)
- $(Q)mkdir -p $(DESTDIR)
- $(Q)tar -C $(RTE_SDK) -cf - mk scripts/*.sh | tar -C $(DESTDIR) -x \
- --keep-newer-files --warning=no-ignore-newer -f -
- $(Q)mkdir -p $(DESTDIR)/$T
- $(Q)tar -C $(RTE_OUTPUT) -chf - \
- --exclude app --exclude hostapp --exclude build \
- --exclude Makefile --exclude .depdirs . | \
- tar -C $(DESTDIR)/$T -x --keep-newer-files \
- --warning=no-ignore-newer -f -
- $(Q)install -D $(RTE_OUTPUT)/app/testpmd \
- $(DESTDIR)/$T/app/testpmd
- @echo Installation in $(DESTDIR) complete
+ifeq ($(DESTDIR)$(if $T,,+),)
+ @echo Installation cannot run with T defined and DESTDIR undefined
+else
+ @echo ================== Installing $(DESTDIR)$(prefix)/
+ $(Q)$(call rte_mkdir, $(DESTDIR)$(libdir))
+ $(Q)cp -a $(RTE_OUTPUT)/lib/* $(DESTDIR)$(libdir)
+ $(Q)$(call rte_mkdir, $(DESTDIR)$(bindir))
+ $(Q)tar -cf - -C $(RTE_OUTPUT) 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)
+ $(Q)$(call rte_mkdir, $(DESTDIR)$(includedir))
+ $(Q)tar -chf - -C $(RTE_OUTPUT) 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)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(targetdir)/include)
+ $(Q)$(call rte_symlink, $(DESTDIR)$(libdir), $(DESTDIR)$(targetdir)/lib)
+ @echo Installation in $(DESTDIR)$(prefix)/ complete
+endif