To reproduce:
> rm -rf
./dist-newstyle/build/x86_64-linux/ghc-8.6.5/darcs-2.15.2/build/darcs
> # make a small change to src/Darcs/UI/Commands/Help.hs
> cabal new-build -f-executable
Build profile: -w ghc-8.6.5 -O1
In order, the following will be built (use -v for more details):
- darcs-2.15.2 (lib:darcs, test:darcs-test) (file
src/Darcs/UI/Commands/Help.hs changed)
Preprocessing library for darcs-2.15.2..
Building library for darcs-2.15.2..
[235 of 235] Compiling Darcs.UI.Commands.Help (
src/Darcs/UI/Commands/Help.hs,
/home/franksen/src/darcs/clean/dist-newstyle/build/x86_64-linux/ghc-8.6.5/darcs-2.15.2/build/Darcs/UI/Commands/Help.o
)
Preprocessing test suite 'darcs-test' for darcs-2.15.2..
Building test suite 'darcs-test' for darcs-2.15.2..
/home/franksen/src/darcs/clean/dist-newstyle/build/x86_64-linux/ghc-8.6.5/darcs-2.15.2/build/darcs/darcs.1:
openFile: does not exist (No such file or directory)
Setup.hs contains
buildManpage lbi = do
let darcs = buildDir lbi </> "darcs/darcs"
manpage = buildDir lbi </> "darcs/darcs.1"
manpageHandle <- openFile manpage WriteMode
void $ runProcess darcs ["help","manpage"]
Nothing Nothing Nothing (Just manpageHandle) Nothing
So we build it as darcs/darcs.1 but with -f-executable the directory
dist-newstyle/build/x86_64-linux/ghc-8.6.5/darcs-2.15.2/build/darcs
doesn't exist.
The clean solution is to build the man page only if we build the
executable. We must find out how to do that.
|