aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/protobuffs.mk
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/protobuffs.mk')
-rw-r--r--plugins/protobuffs.mk7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/protobuffs.mk b/plugins/protobuffs.mk
index 2719c01..b4f9ce6 100644
--- a/plugins/protobuffs.mk
+++ b/plugins/protobuffs.mk
@@ -12,14 +12,13 @@ ifneq ($(wildcard src/),)
PROTO_FILES := $(filter %.proto,$(ALL_SRC_FILES))
ERL_FILES += $(addprefix src/,$(patsubst %.proto,%_pb.erl,$(notdir $(PROTO_FILES))))
-ifeq ($(words $(PROTO_FILES)),0)
+ifeq ($(PROTO_FILES),)
$(ERLANG_MK_TMP)/last-makefile-change-protobuffs:
$(verbose) :
else
# Rebuild proto files when the Makefile changes.
# We exclude $(PROJECT).d to avoid a circular dependency.
-$(ERLANG_MK_TMP)/last-makefile-change-protobuffs: $(filter-out $(PROJECT).d,$(MAKEFILE_LIST))
- $(verbose) mkdir -p $(ERLANG_MK_TMP)
+$(ERLANG_MK_TMP)/last-makefile-change-protobuffs: $(filter-out $(PROJECT).d,$(MAKEFILE_LIST)) | $(ERLANG_MK_TMP)
$(verbose) if test -f $@; then \
touch $(PROTO_FILES); \
fi
@@ -50,7 +49,9 @@ define compile_proto.erl
endef
endif
+ifneq ($(PROTO_FILES),)
$(PROJECT).d:: $(PROTO_FILES)
$(verbose) mkdir -p ebin/ include/
$(if $(strip $?),$(proto_verbose) $(call erlang,$(call compile_proto.erl,$?)))
endif
+endif