#7311: -odir option changes .o and .hi names of main source file to Main.hi/o ------------------------------+--------------------------------------------- Reporter: slyfox | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.6.1 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Testcase: Blockedby: | Blocking: Related: | ------------------------------+--------------------------------------------- One-liner illustrating problem:
{{{ cd /tmp/ && mkdir __tmp_ghc_test && cd __tmp_ghc_test && echo 'main = print 1' > foo.hs && ghc --make foo.hs -odir . && rm -f * && echo 'main = print 1' > foo.hs && ghc --make foo.hs }}} The output is: {{{ [1 of 1] Compiling Main ( foo.hs, Main.o ) Linking foo ... [1 of 1] Compiling Main ( foo.hs, foo.o ) Linking foo ... }}} In the first invocation we have got foo.hi/.o, but in the second Main.hi/.o. It causes problems when user wants to write her custom Makefiles with predictable interface file names. Or just wants to build two programs in one dir: {{{ ghc --make foo.hs -odir . ghc --make bar.hs -odir . }}} Which .o/.hi files will be used in the second case? Thanks! -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7311> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs