Commit 45273419 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

nmk: build.mk -- On cleanup use cleanup-y only

With cleanify helper we remove only they files
we've been generating, not anything else.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent b07d3049
......@@ -55,6 +55,7 @@ ifneq ($(lib-y),)
else
lib-target := $(obj)/lib.a
endif
cleanup-y += $(call cleanify,$(lib-y))
cleanup-y += $(lib-target)
all-y += $(lib-target)
endif
......@@ -66,6 +67,7 @@ ifneq ($(obj-y),)
else
builtin-target := $(obj)/built-in.o
endif
cleanup-y += $(call cleanify,$(obj-y))
cleanup-y += $(builtin-target)
all-y += $(builtin-target)
endif
......@@ -111,6 +113,7 @@ define gen-custom-target-rule
$(call objectify,$($(1)-obj-y)) \
$(call objectify,$($(1)-obj-e))))
all-y += $(obj)/$(1).built-in.o
cleanup-y += $(call cleanify,$(call objectify,$($(1)-obj-y)))
cleanup-y += $(obj)/$(1).built-in.o
endif
ifneq ($($(1)-lib-y),)
......@@ -121,6 +124,7 @@ define gen-custom-target-rule
$(call objectify,$($(1)-lib-e)), \
$(call objectify,$($(1)-lib-y))))
all-y += $(obj)/$(1).lib.a
cleanup-y += $(call cleanify,$(call objectify,$($(1)-lib-y)))
cleanup-y += $(obj)/$(1).lib.a
endif
endef
......@@ -168,7 +172,7 @@ all: $(all-y)
# Clean most files, but leave enough to navigate with tags (generated files)
clean:
$(call msg-clean, $(obj))
$(Q) $(RM) $(obj)/*.o $(obj)/*.d $(obj)/*.i $(obj)/*.s $(cleanup-y)
$(Q) $(RM) $(cleanup-y)
.PHONY: clean
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment