Commit 957f390a authored by Ian Lynagh's avatar Ian Lynagh

Fix cabal01 to work on Windows

parent 6a28cc16
......@@ -10,23 +10,28 @@ clean:
rm -fr install-tmp
rm -fr install
rm -f .setup-config .installed-pkg-config
-$(GHC_PKG_INPLACE) unregister test
setup : Setup.lhs
$(TEST_HC) --make -o setup Setup.lhs
# 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
cabal01: setup
cabal01:
$(MAKE) clean
$(TEST_HC) --make -o setup Setup.lhs
# unregister if pakage 'test' already exists
if $(GHC_PKG_INPLACE) --user list | grep test-; then \
$(GHC_PKG_INPLACE) --user unregister test; \
fi
./setup configure -v0 --prefix=`pwd`/install --with-compiler=$(TEST_HC) --with-hc-pkg=$(GHC_PKG_INPLACE) $(PROF)
./setup configure -v0 --prefix=$(shell $(TOP)/utils/pwd forwardslash)/install --with-compiler=$(TEST_HC) --with-hc-pkg=$(GHC_PKG_INPLACE) $(PROF)
./setup build -v0
./setup copy -v0 --copy-prefix=`pwd`/install-tmp
ls install-tmp
./setup copy -v0
ls install
rm -r install
# install w/ register!
./setup install --user -v0
./setup install -v0
ls install
./setup sdist -v0
ls dist
$(GHC_PKG_INPLACE) unregister --user test
$(GHC_PKG_INPLACE) unregister test
setTestOpts(only_compiler_types(['ghc']))
test('cabal01',
compose(ignore_output,
expect_broken_if_platform(1196, 'i386-unknown-mingw32')),
ignore_output,
run_command, ['$MAKE cabal01 PROF='])
if default_testopts.cleanup != '':
runCmd('$MAKE -C ' + in_testdir('') + ' clean')
test('cabal01prof',
composes([req_profiling,
ignore_output,
expect_broken_if_platform(1196, 'i386-unknown-mingw32')]),
ignore_output]),
run_command, ['$MAKE cabal01 PROF=--enable-library-profiling'])
if default_testopts.cleanup != '':
......
......@@ -5,7 +5,6 @@ Other-Modules: B.A
C-Sources: hello.c, c_src/hello.c
Extensions: ForeignFunctionInterface
Build-depends: base>=1.0, haskell98
extra-lib-dirs: /usr/local/lib
Executable: testA
Other-Modules: A, MainA
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment