Ticket #140 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Cabal doesn't allow doc/html/<package name> to be overridden

Reported by: igloo Owned by: ijones
Priority: high Milestone:
Component: Cabal library Version: 1.1.6
Severity: normal Keywords:
Cc: Difficulty: normal
GHC Version: 6.6 Platform: Linux

Description

Distribution.Simple.LocalBuildInfo? uses

haddockPref pkg_descr
    = foldl1 (</>) [distPref, "doc", "html", pkgName (package pkg_descr)]

and provides no way to override it. This should be a new field docdir (or similar), and be overridable with a configure flag.

Change History

Changed 6 years ago by guest

Ooops, as Ross pointed out, the relevant function is actually

mkHaddockDir :: PackageDescription -> LocalBuildInfo -> CopyDest -> FilePath
mkHaddockDir pkg_descr lbi copydest =
  foldl1 (</>) [mkDataDir pkg_descr lbi copydest,
                    "doc", "html", pkgName (package pkg_descr)]

He says:

haddockPref determines where the documentation is built; mkHaddockDir
says where it is installed, currently $datadir/$datasubdir/doc/html/$pkg,
where $datasubdir defaults to $pkgid.  That default doesn't seem right
in any case.  Perhaps we want

 --docdir (defaulting to $prefix/share/doc on Unix and something else
   on Windows)

 --htmlsubdir (defaulting to $pkgid/html)

Changed 6 years ago by duncan

  • status changed from new to closed
  • resolution set to fixed

Fixed.

The Windows doc path default could still probably do with tweaking, especially for libraries.

Note: See TracTickets for help on using tickets.