michael@0: $(shell \ michael@0: if ! test -f include-dynamic.inc; then \ michael@0: echo "TESTVAR = oldval" > include-dynamic.inc; \ michael@0: sleep 2; \ michael@0: echo "TESTVAR = newval" > include-dynamic.inc.in; \ michael@0: fi \ michael@0: ) michael@0: michael@0: # before running the 'all' rule, we should be rebuilding include-dynamic.inc, michael@0: # because there is a rule to do so michael@0: michael@0: all: michael@0: test $(TESTVAR) = newval michael@0: test "$(MAKE_RESTARTS)" = 1 michael@0: @echo TEST-PASS michael@0: michael@0: include-dynamic.inc: include-dynamic.inc.in michael@0: test "$(MAKE_RESTARTS)" = "" michael@0: cp $< $@ michael@0: michael@0: include include-dynamic.inc