[xmonad] darcs patch: Clean .hi and .o files when recompiling
Gwern Branwen
gwern0 at gmail.com
Mon Mar 22 16:37:24 EDT 2010
On Wed, Sep 9, 2009 at 6:51 PM, Spencer Janssen
<spencerjanssen at gmail.com> wrote:
> On Wed, Sep 09, 2009 at 10:18:39AM +0200, Joachim Breitner wrote:
>> Hi,
>>
>> I???d like to see this in the next release, to reduce the delta between xmonad as
>> shipped by debian and as it is on hackage:
>
> Maybe I missed the original patch (I haven't paid much attention to xmonad in
> the past two months), but I would really appreciate seeing patches when/before
> they're applied downstream. If the fix is important enough to apply in Debian,
> it is probably important enough to at least consider upstream.
>
> Speaking of "delta", are there any other non-integration patches that Debian
> applies?
>
>> Wed Sep 9 10:15:57 CEST 2009 Joachim Breitner <mail at joachim-breitner.de>
>> * Clean .hi and .o files when recompiling
>> This patch is applied to the Debian packages since a few months. During the
>> last ghc upgrade in Debian, people had to this manually to get their xmonad
>> compilable again. This patch should mitigate this a bit.
>
> Regarding this specific change, perhaps we can delete interface and object
> files immediately after compiling? We already instruct GHC to ignore them, so
> they're just taking up disk space. Even better, can we tell GHC to put those
> files in /tmp and clean them up when compilation is done?
We might be able to. Looking at
http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html#temp-files
I see that what it calls 'temporary files' are already going into
/tmp; what we want is to redirect the interface and object files,
which would be done with "-odir" and "-hidir". So maybe
hunk ./XMonad/Core.hs 460
- waitForProcess =<< runProcess "ghc" ["--make",
"xmonad.hs", "-i", "-ilib", "-fforce-recomp", "-v0", "-o",binn] (Just
dir)
+ waitForProcess =<< runProcess "ghc" ["--make",
"xmonad.hs", "-i", "-ilib", "-fforce-recomp", "-hidir", "/tmp",
"-odir", "/tmp", "-v0", "-o",binn] (Just dir)
? (Can we hardcode /tmp?)
If I understand the docs right, this ought to redirect all interface &
object files, including anything in .xmonad/lib.
--
gwern
More information about the xmonad
mailing list