From 56e89b205ff9df37298a335899bd2856a7d9727e Mon Sep 17 00:00:00 2001 From: Dmitry Safonov Date: Tue, 31 Jan 2017 16:56:30 +0300 Subject: [PATCH] protobuf: regenerate images on Makefile changes Result: [japdoll@dsafonov criu]$ touch Makefile [japdoll@dsafonov criu]$ make make[1]: Entering directory '/home/japdoll/tools/criu' PBCC images/macvlan.pb-c.c DEP images/macvlan.pb-c.d PBCC images/autofs.pb-c.c DEP images/autofs.pb-c.d PBCC images/sysctl.pb-c.c DEP images/sysctl.pb-c.d <...> travis-ci: success for Fix rebuild on Makefile changes Signed-off-by: Dmitry Safonov Acked-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- images/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/images/Makefile b/images/Makefile index eb1852623..86a7a0151 100644 --- a/images/Makefile +++ b/images/Makefile @@ -75,10 +75,12 @@ $(shell grep "^[[:blank:]]*import[[:blank:]]" $(1) | \ sort | uniq) endef +makefile-deps := Makefile $(obj)/Makefile + # # Generates rules needed to compile protobuf files. define gen-proto-rules -$(obj)/$(1).pb-c.c $(obj)/$(1).pb-c.h: $(obj)/$(1).proto $(addsuffix .pb-c.c,$(addprefix $(obj)/,$(2))) +$(obj)/$(1).pb-c.c $(obj)/$(1).pb-c.h: $(obj)/$(1).proto $(addsuffix .pb-c.c,$(addprefix $(obj)/,$(2))) $(makefile-deps) $$(E) " PBCC " $$@ $$(Q) protoc-c --proto_path=$(obj)/ --c_out=$(obj)/ $$< ifeq ($(PROTOUFIX),y) @@ -86,7 +88,7 @@ ifeq ($(PROTOUFIX),y) $$(Q) sed -i -e 's/4294967295/0xFFFFFFFF/g' $$(patsubst %.c,%.h,$$@) $$(Q) sed -i -e 's/4294967295/0xFFFFFFFF/g' $$(patsubst %.h,%.c,$$@) endif -$(obj)/$(1).pb-c.d: $(obj)/$(1).pb-c.c $(addsuffix .pb-c.d,$(addprefix $(obj)/,$(2))) +$(obj)/$(1).pb-c.d: $(obj)/$(1).pb-c.c $(addsuffix .pb-c.d,$(addprefix $(obj)/,$(2))) $(makefile-deps) $$(E) " DEP " $$@ $$(Q) $$(CC) -M -MT $$@ -MT $(patsubst %.d,%.o,$$@) $$(CFLAGS) $$< -o $$@ endef