haskell/c2hs — pull request #94 by watashi (2014-07-28 19:09:51+00:00)
Title: Generate preprocessed file and dumped hsc in specified directory

c2hs always generates the preprocessed file and dumped hsc in current working directory, if multiple c2hs run at the same time over the same .chs file or .chs files with the same name but in different directories, race happens.

before:
```
Attempting to read file `s/Main.chs'...
...parsing `s/Main'...
...successfully loaded `s/Main'.
Invoking cpp as `cpp -x c t/s/Main.chs.h'...
Attempting to read file `Main.i'...
...parsing `Main.i'...
...name analysis of `Main.i'...
...successfully loaded `Main.i'.
...expanding binding hooks...
...successfully completed.
```

after:
```
c2hs -d trace -t t s/Main.chs
Attempting to read file `s/Main.chs'...
...parsing `s/Main'...
...successfully loaded `s/Main'.
Invoking cpp as `cpp -x c -U__BLOCKS__ t/s/Main.chs.h'...
Attempting to read file `t/s/Main.i'...
...parsing `t/s/Main.i'...
...name analysis of `t/s/Main.i'...
...successfully loaded `t/s/Main.i'.
...expanding binding hooks...
...successfully completed.
```