diff options
author | David Terei <davidterei@gmail.com> | 2011-07-20 11:09:03 -0700 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2011-07-20 11:26:35 -0700 |
commit | 16514f272fb42af6e9c7674a9bd6c9dce369231f (patch) | |
tree | e4f332b45fe65e2a7a2451be5674f887b42bf199 /testsuite/tests/safeHaskell/check/pkg01/Makefile | |
parent | ebd422aed41048476aa61dd4c520d43becd78682 (diff) | |
download | haskell-16514f272fb42af6e9c7674a9bd6c9dce369231f.tar.gz |
Move tests from tests/ghc-regress/* to just tests/*
Diffstat (limited to 'testsuite/tests/safeHaskell/check/pkg01/Makefile')
-rw-r--r-- | testsuite/tests/safeHaskell/check/pkg01/Makefile | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/testsuite/tests/safeHaskell/check/pkg01/Makefile b/testsuite/tests/safeHaskell/check/pkg01/Makefile new file mode 100644 index 0000000000..7cc80494a1 --- /dev/null +++ b/testsuite/tests/safeHaskell/check/pkg01/Makefile @@ -0,0 +1,46 @@ +TOP=../../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +clean: + rm -rf setup a.out + rm -rf dist + find . -name "*.o" | xargs rm -f + find . -name "*.hi" | xargs rm -f + rm -rf local.db + rm -rf install + +# We use the global package database as there's no easy way to tell +# ghc-pkg (via Cabal) to use one in ., and the global one at least +# won't affect the installed GHC and is more likely to work + +PREFIX := $(abspath install) +$(eval $(call canonicalise,PREFIX)) + +PKGCONF = local.db +LGHC_PKG = '$(GHC_PKG)' --no-user-package-conf -f '$(PKGCONF)' + +safePkg01: + '$(MAKE)' clean + '$(TEST_HC)' --make -o setup Setup.hs -v0 + + '$(GHC_PKG)' init local.db + ./setup configure -v0 --prefix='$(PREFIX)' --with-compiler='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS) -trust base' --with-hc-pkg='$(GHC_PKG)' --package-db='$(PKGCONF)' $(PROF) + ./setup build -v0 + ./setup copy -v0 + ./setup register --inplace -v0 + $(LGHC_PKG) list + $(LGHC_PKG) field safePkg01-1.0 trusted + echo + echo 'M_SafePkg' + '$(TEST_HC)' --show-iface dist/build/M_SafePkg.hi | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:' + echo + echo 'M_SafePkg2' + '$(TEST_HC)' --show-iface dist/build/M_SafePkg2.hi | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:' + echo + echo 'M_SafePkg3' + '$(TEST_HC)' --show-iface dist/build/M_SafePkg3.hi | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:' + echo + echo 'M_SafePkg4' + '$(TEST_HC)' --show-iface dist/build/M_SafePkg4.hi | grep -E '^package dependencies:|^trusted:|^require own pkg trusted:' + |