Practice · 1 of 3
Model Incremental Rebuilds
CHALLENGE
Difficulty: advanced+25 XP
Implement int needs_rebuild(long long tgt_mtime, long long dep_mtimes, size_t n) returning 1 iff any prerequisite mtime is strictly newer than the target's. Then implement int make_would_build(long long tgt, const long long *deps, size_t n, int phony) — same, but a phony target always rebuilds.
Press Submit to check your solution.
Back to lesson: Practice: Build Model Drills