build: fix duplicated clean target in shared_lib/Makefile

Add a CLEAN_FILES macro that shared_lib/Makefile can use
to add to the list of files to be cleaned.

Fixes #663.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I12982e0989e02a69aaea4e470777301280090096

Reviewed-on: https://review.gerrithub.io/c/444427
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Jim Harris 2019-02-13 08:28:03 -07:00 committed by Changpeng Liu
parent 5ab609b3bb
commit 14e443bdfb
2 changed files with 4 additions and 3 deletions

View File

@ -35,6 +35,8 @@ include $(SPDK_ROOT_DIR)/mk/spdk.app_vars.mk
LIBS += $(SPDK_LIB_LINKER_ARGS)
CLEAN_FILES = $(APP)
all : $(APP)
@:
@ -44,6 +46,6 @@ $(APP) : $(OBJS) $(SPDK_LIB_FILES) $(ENV_LIBS)
$(LINK_C)
clean :
$(CLEAN_C) $(APP)
$(CLEAN_C) $(CLEAN_FILES)
include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk

View File

@ -56,8 +56,7 @@ $(SHARED_LINKED_LIB) : $(SHARED_REALNAME_LIB)
all: $(SHARED_LINKED_LIB)
clean:
$(CLEAN_C) $(SHARED_REALNAME_LIB) $(SHARED_LINKED_LIB)
CLEAN_FILES += $(SHARED_REALNAME_LIB) $(SHARED_LINKED_LIB)
install:
$(INSTALL_SHARED_LIB)