RE: Default prefix for Cabal on Windows

On 17 June 2005 17:19, Ross Paterson wrote:
On Thu, Jun 16, 2005 at 04:46:18PM +0100, Simon Marlow wrote:
Simon Marlow wrote:
Ok, so $(ProgramFiles) is determined by the registry. Taking into account comments so far, I think we have:
prefix = $(ProgramFiles)\Haskell\$(PackageName)-$(Version) libdir = $(prefix)\$(Compiler)-$(Version) bindir = $(prefix)\bin
these are only defaults - users & packagers are free to change them.
Slight modification after Brian's comments: if the package is an executable, then
prefix = $(ProgramFiles)\$(PackageName)-$(Version)
(i.e. only libraries on under $(ProgramFiles)\Haskell).
The default value of $(prefix) under Unix recently silently changed from /usr/local to /usr/local/$(Compiler)-$(Version). I'm not sure that's the right thing: it's incompatible with the FHS and with autoconf, and puts executables in a place that's not on my path.
I've fixed that, and made the changes above. However, I think $(libdir) and $(bindir) should be configurable as options to ./setup configure (weren't we going to do that at one stage?). The story is now: On Windows, prefix | is_excutable = $(ProgramFiles)\$(PackageId) | is_library = $(ProgramFiles)\Haskell\$(PackageId) libdir = $(prefix)\$(CompilerId) bindir = $(prefix)\bin On Unix, prefix = "/usr/local" libdir = $(prefix)/$(PackageId)/$(CompilerId) bindir = $(prefix)/bin This is ok for the default prefix, but not great if you want to set prefix to /opt/pkg-1.0, for example - that's why we need to be able to set libdir independently. Cheers, Simon

On Tue, Jun 21, 2005 at 12:14:04PM +0100, Simon Marlow wrote:
I've fixed that, and made the changes above. However, I think $(libdir) and $(bindir) should be configurable as options to ./setup configure (weren't we going to do that at one stage?).
Yes "we" were, but "we" haven't got around to it :-)
The story is now:
On Windows,
prefix | is_excutable = $(ProgramFiles)\$(PackageId) | is_library = $(ProgramFiles)\Haskell\$(PackageId)
libdir = $(prefix)\$(CompilerId) bindir = $(prefix)\bin
On Unix,
prefix = "/usr/local" libdir = $(prefix)/$(PackageId)/$(CompilerId) bindir = $(prefix)/bin
This is ok for the default prefix, but not great if you want to set prefix to /opt/pkg-1.0, for example - that's why we need to be able to set libdir independently.
Actually you have libdir = $(prefix)/lib/$(PackageId)/$(CompilerId) which is better, as the FHS forbids creativity in the names of the immediate subdirectories of /usr/local. But maybe this is something other than libdir, for which the conventional default is libdir = $(prefix)/lib You'll probably also want substitution of variables in these strings before too long.
participants (2)
-
Ross Paterson
-
Simon Marlow