Makefile: don't let update-mocks run unless DEVELOPER and EXPERIMENTAL_FEATURES.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2021-05-21 14:48:05 +09:30
parent 25b5e1e099
commit d868d4470a
1 changed files with 6 additions and 0 deletions

View File

@ -619,7 +619,13 @@ clean: obsclean
find . -name '*gcno' -delete
find . -name '*.nccout' -delete
# These must both be enabled for update-mocks
ifeq ($(DEVELOPER)$(EXPERIMENTAL_FEATURES),11)
update-mocks: $(ALL_TEST_PROGRAMS:%=update-mocks/%.c)
else
update-mocks:
@echo Need DEVELOPER=1 and EXPERIMENTAL_FEATURES=1 to regenerate mocks >&2; exit 1
endif
$(ALL_TEST_PROGRAMS:%=update-mocks/%.c): $(ALL_GEN_HEADERS) $(EXTERNAL_LIBS) $(CCAN_OBJS) ccan/ccan/cdump/tools/cdump-enumstr config.vars