fix repository up-to-dateness detection

and remember targets left to make on errors