commit 7e61d80cf87cb6b1aaf52e6f8f0f89db4dceb5f7
Merge: cd81fbb 09ff6a2
Author: Petr Pudlak <[email protected]>
Date:   Mon Oct 20 16:55:10 2014 +0200

    Merge branch 'stable-2.11' into stable-2.12
    
    * stable-2.11
      Fix broken haskell dependencies
    
    No conflicts.
    
    Signed-off-by: Petr Pudlak <[email protected]>

diff --cc Makefile.am
index b95f668,a1f37f0..07839e5
--- a/Makefile.am
+++ b/Makefile.am
@@@ -1168,9 -1039,19 +1168,20 @@@ HS_MAKEFILE_GHC_SRCS += $(HS_TEST_PROGS
  endif
  Makefile.ghc: $(HS_MAKEFILE_GHC_SRCS) Makefile \
                | $(built_base_sources) $(HS_BUILT_SRCS)
 -      $(GHC) -M -dep-makefile $@ -dep-suffix $(HTEST_SUFFIX) $(HFLAGS) 
-itest/hs \
 +      $(GHC) -M -dep-makefile $@ -dep-suffix $(HPROF_SUFFIX) \
 +              -dep-suffix $(HTEST_SUFFIX) $(HFLAGS) -itest/hs \
                $(HS_PARALLEL3) $(HS_REGEX_PCRE) $(HEXTRA_COMBINED) 
$(HS_MAKEFILE_GHC_SRCS)
+ # Since ghc -M does not generate dependency line for object files, 
dependencies
+ # from a target executable seed object (e.g. src/hluxid.o) to objects which
+ # finally will be linked to the target object (e.g. src/Ganeti/Daemon.o) are
+ # missing in Makefile.ghc.
+ # see: 
https://www.haskell.org/ghc/docs/7.6.2/html/users_guide/separate-compilation.html#makefile-dependencies
+ # Following substitutions will add dependencies between object files which
+ # corresponds to the interface file already there as a dependency for each
+ # object listed in Makefile.ghc.
+ # e.g. src/hluxid.o : src/Ganeti/Daemon.hi
+ #        => src/hluxid.o : src/Ganeti/Daemon.hi src/Ganeti/Daemon.o
+       sed -i -re 's/([^ ]+)\.hi$$/\1.hi \1.o/' $@
  
  @include_makefile_ghc@
  

Reply via email to