Skip to content

Commit f02c410

Browse files
authored
build: fix axiom's build dependency check (#1031)
Make the `HAVE_PROTOBUF_C != 0` check part of recipe where its needed rather than making the check in a phony target. Using phony target results in axiom rebuilding every time any target is build. Fixup of #1012.
1 parent 8ddc8af commit f02c410

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

axiom/Makefile

+4-7
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,10 @@ nr_config.h: configure Makefile
195195
#
196196
# Build the 8T protobuf code.
197197
#
198-
v1.pb-c.c: v1.proto protobuf-c
198+
v1.pb-c.c: v1.proto
199+
ifeq (0,$(HAVE_PROTOBUF_C))
200+
$(error Build dependency 'protobuf-c' not found.)
201+
endif
199202
$(PROTOBUF_C_PREFIX)/bin/protoc-c --c_out=. $<
200203

201204
#
@@ -205,12 +208,6 @@ v1.pb-c.c: v1.proto protobuf-c
205208
v1.pb-c.o: v1.pb-c.c
206209
$(CC) $(AXIOM_CPPFLAGS) $(CPPFLAGS) $(AXIOM_CFLAGS) $(PCRE_CFLAGS) $(VENDOR_CFLAGS) $(CFLAGS) -MMD -MP -Wno-cast-qual -c $< -o $@
207210

208-
.PHONY: protobuf-c
209-
protobuf-c:
210-
ifeq (0,$(HAVE_PROTOBUF_C))
211-
$(error Build dependency 'protobuf-c' not found.)
212-
endif
213-
214211
#
215212
# Track the flags passed to the compiler to force a rebuild when they change.
216213
# This ensures a rebuild occurs when the version number or commit are updated.

0 commit comments

Comments
 (0)