Makefile.am: Fix wrong -dep-suffix for GHC 7.8
authorNiklas Hambuechen <niklash@google.com>
Fri, 31 Oct 2014 15:40:27 +0000 (16:40 +0100)
committerKlaus Aehlig <aehlig@google.com>
Wed, 6 May 2015 17:16:21 +0000 (19:16 +0200)
commit3714c81358e0ae04cc28bc4a1d44dcb2c0aa01c7
tree635ea5e875de5ebdc4804eefe3b36aa324451799
parent5ff052c00246171b80b130b778faf13c18675ade
Makefile.am: Fix wrong -dep-suffix for GHC 7.8

This works around https://ghc.haskell.org/trac/ghc/ticket/9749:

GHC 7.8 (undocumentedly) changed the way in which ghc -M generated
object file dependencies, lacking the underscore that older versions
added automatically to the file names.
It also requires a -dep-suffix for the plain object file (.o).

This commit detects GHC 7.6 and older (7.7 is development only, has no
release and is treated equal to 7.8), and adjusts the -M invocation
appropriately for newer GHC versions.

Signed-off-by: Niklas Hambuechen <niklash@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

Cherry-picked-from: b78a2c3
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Makefile.am
configure.ac