Commit d37a1907 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Allow the bindir, libdir and libexec dir to be specified via env vars too

Same as for the datadir. Eg for package Foo, you'd use
Foo_bindir=... Foo_datadir=... Foo_libexecdir=... ./Foo
The next step would be generating a wrapper script that allows
running the program inplace. It should also work for a library.
parent 4a213d39
......@@ -192,10 +192,10 @@ buildPathsModule distPref pkg_descr lbi =
"\nlibexecdir = " ++ show flat_libexecdir ++
"\n"++
"\ngetBinDir, getLibDir, getDataDir, getLibexecDir :: IO FilePath\n"++
"getBinDir = return bindir\n"++
"getLibDir = return libdir\n"++
"getBinDir = "++mkGetEnvOr "bindir" "return bindir"++"\n"++
"getLibDir = "++mkGetEnvOr "libdir" "return libdir"++"\n"++
"getDataDir = "++mkGetEnvOr "datadir" "return datadir"++"\n"++
"getLibexecDir = return libexecdir\n" ++
"getLibexecDir = "++mkGetEnvOr "libexecdir" "return libexecdir"++"\n"++
"\n"++
"getDataFileName :: FilePath -> IO FilePath\n"++
"getDataFileName name = do\n"++
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment