#!/bin/sh -eu # A target must not be rebuilt when a dependency of a dependency does not change. >all.do printf 'redo-ifchange a\n' >a.do printf 'redo-ifchange b\ndate +%s\n' >b.do printf 'redo-ifchange c\ndate +%s\n' >c printf '1' redo c printf '1' redo