mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-03 07:45:17 +00:00
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: Cyrill Gorcunov <gorcunov@openvz.org> Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
b07d304905
commit
4527341928
@@ -55,6 +55,7 @@ ifneq ($(lib-y),)
|
|||||||
else
|
else
|
||||||
lib-target := $(obj)/lib.a
|
lib-target := $(obj)/lib.a
|
||||||
endif
|
endif
|
||||||
|
cleanup-y += $(call cleanify,$(lib-y))
|
||||||
cleanup-y += $(lib-target)
|
cleanup-y += $(lib-target)
|
||||||
all-y += $(lib-target)
|
all-y += $(lib-target)
|
||||||
endif
|
endif
|
||||||
@@ -66,6 +67,7 @@ ifneq ($(obj-y),)
|
|||||||
else
|
else
|
||||||
builtin-target := $(obj)/built-in.o
|
builtin-target := $(obj)/built-in.o
|
||||||
endif
|
endif
|
||||||
|
cleanup-y += $(call cleanify,$(obj-y))
|
||||||
cleanup-y += $(builtin-target)
|
cleanup-y += $(builtin-target)
|
||||||
all-y += $(builtin-target)
|
all-y += $(builtin-target)
|
||||||
endif
|
endif
|
||||||
@@ -111,6 +113,7 @@ define gen-custom-target-rule
|
|||||||
$(call objectify,$($(1)-obj-y)) \
|
$(call objectify,$($(1)-obj-y)) \
|
||||||
$(call objectify,$($(1)-obj-e))))
|
$(call objectify,$($(1)-obj-e))))
|
||||||
all-y += $(obj)/$(1).built-in.o
|
all-y += $(obj)/$(1).built-in.o
|
||||||
|
cleanup-y += $(call cleanify,$(call objectify,$($(1)-obj-y)))
|
||||||
cleanup-y += $(obj)/$(1).built-in.o
|
cleanup-y += $(obj)/$(1).built-in.o
|
||||||
endif
|
endif
|
||||||
ifneq ($($(1)-lib-y),)
|
ifneq ($($(1)-lib-y),)
|
||||||
@@ -121,6 +124,7 @@ define gen-custom-target-rule
|
|||||||
$(call objectify,$($(1)-lib-e)), \
|
$(call objectify,$($(1)-lib-e)), \
|
||||||
$(call objectify,$($(1)-lib-y))))
|
$(call objectify,$($(1)-lib-y))))
|
||||||
all-y += $(obj)/$(1).lib.a
|
all-y += $(obj)/$(1).lib.a
|
||||||
|
cleanup-y += $(call cleanify,$(call objectify,$($(1)-lib-y)))
|
||||||
cleanup-y += $(obj)/$(1).lib.a
|
cleanup-y += $(obj)/$(1).lib.a
|
||||||
endif
|
endif
|
||||||
endef
|
endef
|
||||||
@@ -168,7 +172,7 @@ all: $(all-y)
|
|||||||
# Clean most files, but leave enough to navigate with tags (generated files)
|
# Clean most files, but leave enough to navigate with tags (generated files)
|
||||||
clean:
|
clean:
|
||||||
$(call msg-clean, $(obj))
|
$(call msg-clean, $(obj))
|
||||||
$(Q) $(RM) $(obj)/*.o $(obj)/*.d $(obj)/*.i $(obj)/*.s $(cleanup-y)
|
$(Q) $(RM) $(cleanup-y)
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user