diff --git a/ghc/tests/mk/should_compile.mk b/ghc/tests/mk/should_compile.mk
new file mode 100644
index 0000000000000000000000000000000000000000..cb08aa566c2deabc3739a43ef78ea8ab37e1b0bd
--- /dev/null
+++ b/ghc/tests/mk/should_compile.mk
@@ -0,0 +1,13 @@
+#-----------------------------------------------------------------------------
+# template for should_compile tests.
+
+HS_SRCS = $(wildcard *.hs)
+
+SRC_RUNTEST_OPTS += -o1 $*.stdout -o2 $*.stderr -x 0
+
+%.o : %.hs
+	@echo \*\*\* Testing for successful compilation of $<
+	@$(RUNTEST) $(HC) $(RUNTEST_OPTS) -- $(HC_OPTS) -c $< -o $@
+
+all :: $(HS_OBJS)
+
diff --git a/ghc/tests/mk/should_fail.mk b/ghc/tests/mk/should_fail.mk
new file mode 100644
index 0000000000000000000000000000000000000000..3c43e3634ea9ba003c2bcfc39a348cc0b7132f03
--- /dev/null
+++ b/ghc/tests/mk/should_fail.mk
@@ -0,0 +1,12 @@
+#-----------------------------------------------------------------------------
+# template for should_fail tests
+
+HS_SRCS = $(wildcard *.hs)
+
+SRC_RUNTEST_OPTS += -o1 $*.stdout -o2 $*.stderr -x 1
+
+%.o : %.hs
+	@echo \*\*\* Testing for failure to compile $<
+	@$(RUNTEST) $(HC) $(RUNTEST_OPTS) -- $(HC_OPTS) -c $< -o $@
+
+all :: $(HS_OBJS)