--- /dev/null
+#!/bin/sh -eu
+# A target built by a dofile built during the build by a dofile built during the build must be built.
+
+test -e a.do.do && rm a.do.do
+test -e a.do && rm a.do
+test -e a && rm a
+
+>a.do.do.do cat <<DODODO
+cat <<DODO
+cat <<DO
+date +%s
+DO
+DODO
+DODODO
+
+redo a.do.do
+redo a.do
+redo a
+
+test -e a.do.do
+test -e a.do
+test -e a