- -- Discover whether we're running in a build tree or in an installation,
- -- by looking for a file we use for that purpose
- ; am_inplace <- doesFileExist (top_dir </> "inplace")
-
- ; return (not am_inplace, top_dir)
+ ; exists1 <- doesFileExist (top_dir </> "package.conf")
+ ; exists2 <- doesFileExist (top_dir </> "inplace")
+ ; let amInplace = not exists1 -- On Windows, package.conf doesn't exist
+ -- when we are inplace
+ || exists2 -- On Linux, the presence of inplace signals
+ -- that we are inplace
+
+ ; return (not amInplace, top_dir)