Commit 67bd4787 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

images/Makefile: sanitize cleaning

Instead of removing everything by means of a few wildcards,
let's properly generate the file names to be removed.

[v2: fix a typo, thanks to dsafonov@]
[v3: resend with a typo fixed for real, this time]
Reviewed-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent ebb7087a
...@@ -105,6 +105,7 @@ $(obj)/%.o: $(obj)/%.pb-c.c $(obj)/%.pb-c.h ...@@ -105,6 +105,7 @@ $(obj)/%.o: $(obj)/%.pb-c.c $(obj)/%.pb-c.h
$(obj)/built-in.o: $(addprefix $(obj)/,$(proto-obj-y)) $(obj)/built-in.o: $(addprefix $(obj)/,$(proto-obj-y))
$(E) " LINK " $@ $(E) " LINK " $@
$(Q) $(LD) $(ldflags-y) -r -o $@ $^ $(Q) $(LD) $(ldflags-y) -r -o $@ $^
cleanup-y += $(obj)/built-in.o
ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),mrproper) ifneq ($(MAKECMDGOALS),mrproper)
...@@ -112,9 +113,7 @@ ifneq ($(MAKECMDGOALS),mrproper) ...@@ -112,9 +113,7 @@ ifneq ($(MAKECMDGOALS),mrproper)
endif endif
endif endif
mrproper-y += $(obj)/*.pb-c.c $(obj)/*.pb-c.h cleanup-y += $(call cleanify,$(addprefix $(obj)/,$(proto-obj-y)))
cleanup-y += $(obj)/*.o $(obj)/*.d $(obj)/*.s $(obj)/*.i cleanup-y += $(call cleanify,$(addprefix $(obj)/,$(proto-obj-y:.o=.pb-c.o)))
cleanup-y += $(obj)/google/protobuf/*.d mrproper-y += $(addprefix $(obj)/,$(proto-obj-y:.o=.pb-c.c))
cleanup-y += $(obj)/google/protobuf/*.h mrproper-y += $(addprefix $(obj)/,$(proto-obj-y:.o=.pb-c.h))
cleanup-y += $(obj)/google/protobuf/*.c
cleanup-y += $(obj)/google/protobuf/*.o
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