summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/driver/recomp003/Makefile
blob: 45ae0cbbdf033bd4eefbbe5edc7b9b977ec7f197 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
TOP=../../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk

OBJSUFFIX = .o

# Test that adding a new module that shadows a package module causes
# recompilation.  Part of bug #1372.
recomp003:
	$(RM) A.hi A$(OBJSUFFIX) out
	$(RM) -rf Data
	mkdir Data
	'$(TEST_HC)' $(TEST_HC_OPTS) -c A.hs
	echo "module Data.Char where" > Data/Char.hs
	'$(TEST_HC)' $(TEST_HC_OPTS) -c Data/Char.hs
	# Should now recompile A.hs, because Char is now a home module:
	'$(TEST_HC)' $(TEST_HC_OPTS) -c A.hs 2>err
	@if grep NOT err; then false; fi