`ghc -M` doesn't emit dependencies for header files included either via CPP or CApiFFI
Given the following simple module
{-# LANGUAGE CPP, CApiFFI #-}
#include "Bar.hs.inc"
module Foo where
foreign import capi unsafe "cbits.h foo" c_foo :: Int -> IO ()
The dependency information produced by ghc -dep-suffix '' -M Foo.hs
is
# DO NOT DELETE: Beginning of Haskell dependencies
Foo.o : Foo.hs
# DO NOT DELETE: End of Haskell dependencies
And neither mention the include header dependency cbits.h
nor Bar.hs.inc
.