[GHC] #9287: changed dependency generation

GHC ghc-devs at haskell.org
Wed Jul 9 10:59:03 UTC 2014


#9287: changed dependency generation
------------------------------------+--------------------------------------
       Reporter:  maeder            |             Owner:
           Type:  task              |            Status:  new
       Priority:  normal            |         Milestone:
      Component:  Documentation     |           Version:  7.8.2
       Keywords:                    |  Operating System:  Unknown/Multiple
   Architecture:  Unknown/Multiple  |   Type of failure:  Documentation bug
     Difficulty:  Unknown           |         Test Case:
     Blocked By:                    |          Blocking:
Related Tickets:                    |
------------------------------------+--------------------------------------
 "ghc -M" for ghc-7.8.x changed in that an error occurs:

 {{{
  You must specify at least one -dep-suffix
 }}}

 By chance (#8746) I found that

 {{{
 ghc -M -dep-suffix "" B.hs
 }}}

 works, but only for the new ghc-7.8.x. For module B importing module A the
 following dependencies are generated:

 {{{
 # DO NOT DELETE: Beginning of Haskell dependencies
 A.o : A.hs
 B.o : B.hs
 B.o : A.hi
 # DO NOT DELETE: End of Haskell dependencies
 }}}

 The same command used with ghc-7.6.x produces wrong dependencies:

 {{{
 # DO NOT DELETE: Beginning of Haskell dependencies
 A.o A._o : A.hs
 B.o B._o : B.hs
 B.o : A.hi
 B._o : A._hi
 # DO NOT DELETE: End of Haskell dependencies
 }}}

 Obviously, only for dynamic linking a dep-suffix should be needed. However
 for ghc-7.6. this must be "dyn" and for ghc-7.8.x this must "dyn_" plus
 the empty suffix!

 {{{
 ghc-7.6.3 -M -dep-suffix dyn B.hs
 ghc-7.8.2 -M -dep-suffix dyn_ -dep-suffix "" B.hs
 }}}

 Both calls produce:

 {{{
 # DO NOT DELETE: Beginning of Haskell dependencies
 A.o A.dyn_o : A.hs
 B.o B.dyn_o : B.hs
 B.o : A.hi
 B.dyn_o : A.dyn_hi
 # DO NOT DELETE: End of Haskell dependencies
 }}}

 The changed behavior is not documented in
 http://www.haskell.org/ghc/docs/7.8.2/html/users_guide/separate-
 compilation.html#makefile-dependencies

 The (accidental?) change should also be documented in the release notes!

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9287>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list