Skip to content

Commit f440744

Browse files
committed
Force rebuild when creating a fresh .d file
This will ensure we properly rebuild projects that have a .app file committed, since the .d file is not.
1 parent ba4dcff commit f440744

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/erlc.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,12 @@ endef
262262

263263
ifeq ($(if $(NO_MAKEDEP),$(wildcard $(PROJECT).d),),)
264264
$(PROJECT).d:: $(ERL_FILES) $(EX_FILES) $(call core_find,include/,*.hrl) $(MAKEFILE_LIST)
265+
# Rebuild everything when the .d file does not exist.
266+
# We touch $@ to make sure the command doesn't fail in empty projects.
267+
# The file will be generated with content immediately after.
268+
$(verbose) if ! test -e $@; then \
269+
touch $@ $(ERL_FILES) $(CORE_FILES) $(ASN1_FILES) $(MIB_FILES) $(XRL_FILES) $(YRL_FILES); \
270+
fi
265271
$(makedep_verbose) $(call erlang,$(call makedep.erl,$@))
266272
endif
267273

0 commit comments

Comments
 (0)