diff options
author | Dmitry Safonov <dsafonov@virtuozzo.com> | 2016-03-18 13:09:33 +0300 |
---|---|---|
committer | Pavel Emelyanov <xemul@virtuozzo.com> | 2016-03-25 23:39:21 +0300 |
commit | 7e2eee9e3ca75c7d4429f41804e8ba9c9b7ac7d7 (patch) | |
tree | 98185bc3384be9ccd5a3b29f94a7c9e360f2882e /images/Makefile | |
parent | 19bd013a1e5d90646d2fc48ced39ea8c1ce45b21 (diff) |
build: add mrproper target
Each time I type `make clean` and find that my tags are cleaned
and generated headers/c-files are deleted, I'm getting annoyed.
Mostly it's about protobuf images definitions.
(And then I need to run `make` and `make tags` again which
is painful).
I think, we may separate clean process on two parts, just
like it's done in the kernel (omitting distclean):
o Cleaning all binaries/objects, but leave enough to navigate
o Clean everything compiled/generated/etc.
In this patch pie blobs are still deleted on clean stage - I may
fix it in the later patches.
(they _should_ be regenerated on `make clean && make`)
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Diffstat (limited to 'images/Makefile')
-rw-r--r-- | images/Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/images/Makefile b/images/Makefile index 16ecb6ab5..4ced69988 100644 --- a/images/Makefile +++ b/images/Makefile @@ -102,10 +102,13 @@ $(obj)/built-in.o: $(addprefix $(obj)/,$(proto-obj-y)) $(Q) $(LD) $(ldflags-y) -r -o $@ $^ ifneq ($(MAKECMDGOALS),clean) +ifneq ($(MAKECMDGOALS),mrproper) -include $(addprefix $(obj)/,$(proto-obj-y:.o=.pb-c.d)) endif +endif -cleanup-y += $(obj)/*.c.d $(obj)/*.pb-c.c $(obj)/*.pb-c.h +mrproper-y += $(obj)/*.pb-c.c $(obj)/*.pb-c.h +cleanup-y += $(obj)/*.c.d cleanup-y += $(obj)/google/protobuf/*.d cleanup-y += $(obj)/google/protobuf/*.h cleanup-y += $(obj)/google/protobuf/*.c |