summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/TH_recompile/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/th/TH_recompile/Makefile')
-rw-r--r--testsuite/tests/th/TH_recompile/Makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/tests/th/TH_recompile/Makefile b/testsuite/tests/th/TH_recompile/Makefile
new file mode 100644
index 0000000000..87fab6348a
--- /dev/null
+++ b/testsuite/tests/th/TH_recompile/Makefile
@@ -0,0 +1,22 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+# Test for trac #481. GHC should notice that the code that generates
+# the splice has changed, and thus re-run it.
+
+clean:
+ rm -f *.o
+ rm -f hi
+ rm -f test test2
+ rm -f Sub.hs
+
+TH_recompile:
+ $(MAKE) clean
+ cp Sub1.hs Sub.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make -XTemplateHaskell Main.hs -o test
+ cp Sub2.hs Sub.hs
+ '$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make -XTemplateHaskell Main.hs -o test2
+ ./test
+ ./test2
+