Create empty dump files when there was nothing to dump
[ghc.git] / testsuite / tests / driver / recomp013 / Makefile
1 TOP=../../..
2 include $(TOP)/mk/boilerplate.mk
3 include $(TOP)/mk/test.mk
4
5 # -fforce-recomp makes lots of driver tests trivially pass, so we
6 # filter it out from $(TEST_HC_OPTS).
7 TEST_HC_OPTS_NO_RECOMP = $(filter-out -fforce-recomp,$(TEST_HC_OPTS))
8
9 # Recompilation tests
10
11 clean:
12 rm -f *.o *.hi
13
14 # bug #8247
15
16 recomp013: clean
17 echo 'module A where a1 = 5; a2 = 42; a3 = 113' > A.hs
18 echo 'module B (module A) where import A hiding (a1)' > B.hs
19 echo 'module C where import B; a2 = 142' > C.hs
20 echo 'first run'
21 '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make C.hs
22 sleep 1
23 echo 'module B (module A) where import A hiding (a1, a2)' > B.hs
24 echo 'second run'
25 '$(TEST_HC)' $(TEST_HC_OPTS_NO_RECOMP) --make C.hs