fix(build): delete incorrect/old .d and .olean files, detect errors when generating .d files.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
d5bb7d45ec
commit
59f6cb5962
2 changed files with 7 additions and 5 deletions
|
@ -7,15 +7,17 @@ DEP_FILES = $(LEAN_FILES:.lean=.d)
|
|||
all: $(OLEAN_FILES) $(DEP_FILES)
|
||||
|
||||
%.olean: %.lean
|
||||
$(LEAN) $(LEAN_OPTIONS) $< -o $@
|
||||
|
||||
%.olean: %.lua
|
||||
@rm -f $@
|
||||
$(LEAN) $(LEAN_OPTIONS) $< -o $@
|
||||
|
||||
%.d: %.lean
|
||||
@echo Making dependency file \'$@\' ...
|
||||
@rm -f $@
|
||||
@rm -f $@.tmp
|
||||
@$(LEAN) --deps $< > $@.tmp
|
||||
@printf "$(basename $@).olean : $< $@ " > $@
|
||||
@$(LEAN) --deps $< | tr "\n" " " >> $@
|
||||
@tr "\n" " " < $@.tmp >> $@
|
||||
@rm -f $@.tmp
|
||||
|
||||
-include $(LEAN_FILES:.lean=.d)
|
||||
|
||||
|
|
|
@ -258,7 +258,7 @@ int main(int argc, char ** argv) {
|
|||
}
|
||||
return ok ? 0 : 1;
|
||||
} catch (lean::exception & ex) {
|
||||
::lean::display_error(regular(env, ios), nullptr, ex);
|
||||
::lean::display_error(diagnostic(env, ios), nullptr, ex);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue