diff --git a/build/common.mk b/build/common.mk index b893f3596f..c90683b862 100644 --- a/build/common.mk +++ b/build/common.mk @@ -36,9 +36,11 @@ DSTPATH = $(DIR)$@ @echo "[AR] $(addprefix $(DIR),$^) -> $(DSTPATH)" $(AR) rs $@ $^ 2> /dev/null -assym.h: genassym.cf +GENASSYM-DEPS := sed -ne 's,\(include\) <\(.*\)>,$(TOPDIR)/\1/\2,gp' + +assym.h: genassym.cf $(shell $(GENASSYM-DEPS) genassym.cf) @echo "[ASSYM] $(DSTPATH)" - $(GENASSYM) $(CC) $(ASSYM_CFLAGS) $(CFLAGS) $(CPPFLAGS) < $^ > $@ + $(GENASSYM) $(CC) $(ASSYM_CFLAGS) $(CFLAGS) $(CPPFLAGS) < $< > $@ %/assym.h: %/genassym.cf @echo "[ASSYM] $(DSTPATH)"