build: Install targets for nvme perf and identify

Introduces new macro INSTALL_EXAMPLE and two example apps,
examples/nvme/perf and example/nvme/identify that make
use of it to install them while at the same time
renaming them in the target directory based on the
source directory path relative to examples.

Change-Id: I2d850458bb2589f80e0af6fb7a9d00aa3bbc6907
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/429963 (master)
Reviewed-on: https://review.gerrithub.io/435696
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Lance Hartmann 2018-10-18 14:48:49 -04:00 committed by Ben Walker
parent b8718ca652
commit e9e2d6fd23
3 changed files with 11 additions and 0 deletions

View File

@ -36,4 +36,7 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
APP = identify
install: $(APP)
$(INSTALL_EXAMPLE)
include $(SPDK_ROOT_DIR)/mk/nvme.libtest.mk

View File

@ -41,4 +41,7 @@ SYS_LIBS += -laio
CFLAGS += -DHAVE_LIBAIO
endif
install: $(APP)
$(INSTALL_EXAMPLE)
include $(SPDK_ROOT_DIR)/mk/nvme.libtest.mk

View File

@ -287,6 +287,11 @@ INSTALL_APP=\
install -d -m 755 "$(DESTDIR)$(bindir)"; \
install -m 755 "$(APP)" "$(DESTDIR)$(bindir)/"
INSTALL_EXAMPLE=\
$(Q)echo " INSTALL $(DESTDIR)$(bindir)/spdk_$(strip $(subst /,_,$(subst $(SPDK_ROOT_DIR)/examples/, ,$(CURDIR))))"; \
install -d -m 755 "$(DESTDIR)$(bindir)"; \
install -m 755 "$(APP)" "$(DESTDIR)$(bindir)/spdk_$(strip $(subst /,_,$(subst $(SPDK_ROOT_DIR)/examples/, ,$(CURDIR))))"
# Install a header
INSTALL_HEADER=\
$(Q)echo " INSTALL $@"; \