summaryrefslogtreecommitdiff
path: root/python/pymake/tests/include-dynamic.mk
diff options
context:
space:
mode:
Diffstat (limited to 'python/pymake/tests/include-dynamic.mk')
-rw-r--r--python/pymake/tests/include-dynamic.mk21
1 files changed, 21 insertions, 0 deletions
diff --git a/python/pymake/tests/include-dynamic.mk b/python/pymake/tests/include-dynamic.mk
new file mode 100644
index 000000000..571895dc3
--- /dev/null
+++ b/python/pymake/tests/include-dynamic.mk
@@ -0,0 +1,21 @@
+$(shell \
+if ! test -f include-dynamic.inc; then \
+ echo "TESTVAR = oldval" > include-dynamic.inc; \
+ sleep 2; \
+ echo "TESTVAR = newval" > include-dynamic.inc.in; \
+fi \
+)
+
+# before running the 'all' rule, we should be rebuilding include-dynamic.inc,
+# because there is a rule to do so
+
+all:
+ test $(TESTVAR) = newval
+ test "$(MAKE_RESTARTS)" = 1
+ @echo TEST-PASS
+
+include-dynamic.inc: include-dynamic.inc.in
+ test "$(MAKE_RESTARTS)" = ""
+ cp $< $@
+
+include include-dynamic.inc