Commit 14eb731f authored by Ian Lynagh's avatar Ian Lynagh
Browse files

In wrappers, $executablename needs to expand to something with DESTDIR

The installed wrapper needs to call the executable in its final place,
not inside the DESTDIR where we are constructing a package.
parent 42fdf00b
......@@ -868,13 +868,16 @@ installExe flags lbi installDirs pretendInstallDirs buildPref (progprefix, progs
if useWrapper
then do
let libExecDir = libexecdir installDirs
pretendLibExecDir = libexecdir pretendInstallDirs
absExeFileName =
libExecDir </> fixedExeBaseName <.> exeExtension
pretendAbsExeFileName =
pretendLibExecDir </> fixedExeBaseName <.> exeExtension
wrapperFileName = binDir </> fixedExeBaseName
myPkgId = packageId (PD.package (localPkgDescr lbi))
myCompilerId = compilerId (compiler lbi)
env = (ExecutableNameVar,
toPathTemplate absExeFileName)
toPathTemplate pretendAbsExeFileName)
: fullPathTemplateEnv myPkgId myCompilerId
createDirectoryIfMissingVerbose verbosity True libExecDir
Supports Markdown
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