On Fri, Aug 30, 2013 at 10:28:25AM +0200, Jose A. Lopes wrote: > Hi, > > I took another look at the Makefile regarding this problem and I think > there are 3 use cases to focus on. These uses cases concern partial > compilation of Haskell sources, i.e., I have compiled some Haskell > sources with some flags and other Haskell sources with other flags, > and I don't want to mix different flags in the same linkage stage. > > The three uses cases are: > 1. Normal compilation > 2. Compilation with profiling > 3. Compilation with coverage > > This means, for example, that we shouldn't mix Haskell object files > compiled with profiling with those compiled with coverage. > > There are other flags that control Haskell compilation, such as, PCRE > and Parallel3, that control whether these libraries are available. > However, these seem less important in the following sense: they are > defined at configure time and they should remain the same while > compiling the Haskell binaries. In other words, I don't thinkg that > we should worry about someone compiling some Haskell source files with > PCRE and some other Haskell source files without PCRE. The same for > Parallel3.
Indeed. > Anyone care to comment ? I have only one question, in general: what is the goal you're trying to achieve? If it is to eliminate duplicate compilation of the same source file, I have two notes to make (and I won't comment more on this thread): - even if files are compiled twice or N times, you have many CPUs, so you're not blocked on it; what's the problem with having 3 CPUs all compiling the same file? - the proper way to eliminate duplicate compilation, if you really want it, is to simulate/duplicate what Cabal does: build once all files in a local package, then link the binaries against the (single, common) library; this way, all issues will go away Doing more Makefile-style work seems to me more worth than trouble. thanks, iustin