`_ <- mapM` --> `mapM_`
[ghc.git] / testsuite / tests / cabal / sigcabal02 / Makefile
1 TOP=../../..
2 include $(TOP)/mk/boilerplate.mk
3 include $(TOP)/mk/test.mk
4
5 SETUP=../Setup -v0
6
7 # This test is for two Cabal packages exposing the same signature
8
9 sigcabal02:
10 $(MAKE) clean
11 '$(GHC_PKG)' field containers id | sed 's/^.*: *//' > containers
12 '$(GHC_PKG)' init tmp.d
13 '$(TEST_HC)' -v0 --make Setup
14 cd p && $(SETUP) clean
15 cd p && $(SETUP) configure $(CABAL_MINIMAL_BUILD) --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --prefix='$(PWD)/inst-p' --instantiate-with="Map=Data.Map.Lazy@`cat ../containers`" --instantiate-with="Set=Data.Set@`cat ../containers`" --ghc-pkg-options="--enable-multi-instance"
16 cd p && $(SETUP) build
17 cd p && $(SETUP) copy
18 cd p && $(SETUP) register --print-ipid > ../p_ipid
19 cd q && $(SETUP) clean
20 cd q && $(SETUP) configure $(CABAL_MINIMAL_BUILD) --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --prefix='$(PWD)/inst-p' --instantiate-with="Map=Data.Map.Lazy@`cat ../containers`" --ghc-pkg-options="--enable-multi-instance"
21 cd q && $(SETUP) build
22 cd q && $(SETUP) copy
23 cd q && $(SETUP) register --print-ipid > ../q_ipid
24 '$(TEST_HC)' $(TEST_HC_OPTS) -package-db=tmp.d -hide-all-packages -package base -package containers -package-id "`cat p_ipid`" -package-id "`cat q_ipid`" --make Main.hs
25 ./Main
26 ! '$(TEST_HC)' $(TEST_HC_OPTS) -package-db=tmp.d -hide-all-packages -package base -package containers -package-id "`cat p_ipid`" -package-id "`cat q_ipid`" --make ShouldFail.hs
27 ifneq "$(CLEANUP)" ""
28 $(MAKE) clean
29 endif
30
31 clean :
32 '$(GHC_PKG)' unregister --force p >/dev/null 2>&1 || true
33 '$(GHC_PKG)' unregister --force q >/dev/null 2>&1 || true
34 $(RM) -r tmp.d inst-* *.o *.hi */*.o */*.hi */Setup$(exeext) */dist Setup$(exeext)