Commit 98d41569 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Make our own pwd, so we don't get confused by paths on cygwin

parent 1b164405
...@@ -16,8 +16,9 @@ include $(TOP)/mk/test.mk ...@@ -16,8 +16,9 @@ include $(TOP)/mk/test.mk
# using the supplied Cabal configuration. # using the supplied Cabal configuration.
rn.prog006: rn.prog006:
$(TEST_HC) -v0 pwd.hs -o pwd
$(TEST_HC) --make -package-name test-1.0 B.C -no-recomp -v0 $(TEST_HC) --make -package-name test-1.0 B.C -no-recomp -v0
sed "s@__IMPORT__@`pwd`@" <pkg.conf.in >pkg.conf sed "s@__IMPORT__@`./pwd`@" <pkg.conf.in >pkg.conf
$(TEST_HC) -c -package-conf pkg.conf -package test -no-recomp A.hs -i $(TEST_HC) -c -package-conf pkg.conf -package test -no-recomp A.hs -i
# The -i clears the search path, so A.hs will find B.C from package test # The -i clears the search path, so A.hs will find B.C from package test
# #
......
test('rn.prog006', normal, run_command, ['$MAKE -s --no-print-directory rn.prog006']) test('rn.prog006', normal, run_command, ['$MAKE -s --no-print-directory rn.prog006'])
clean(['A.hi', 'A.o', 'Main.hi', 'Main.o', 'pkg.conf', 'B/C.hi', 'B/C.o']) clean(['A.hi', 'A.o', 'Main.hi', 'Main.o', 'pkg.conf', 'B/C.hi', 'B/C.o'])
clean(['pwd', 'pwd.exe', 'pwd.o', 'pwd.hi'])
module Main where
import System.Directory
main :: IO ()
main = do d <- getCurrentDirectory
putStr $ concatMap escape d
-- We have to escape \ twice, once to get through sed and again to get
-- through parsing pkg.conf
escape :: Char -> String
escape '\\' = "\\\\\\\\"
escape c = [c]
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