Fix create_exe_symlink.cmake for when DESTDIR is set

Matthew Woehlke mw_triad at users.sourceforge.net
Thu May 7 17:56:38 CEST 2009


ABCD wrote:
> First off, my apologies if I sent this to the wrong list.
> 
> Currently, KDE/kdelibs/cmake/modules/create_exe_symlink.cmake calls
> chmod on the previously installed version of a file when DESTDIR is
> set, which is incorrect.  It should be calling chmod on the filename
> under DESTDIR.  This patch (attached) fixes that.

-    EXECUTE_PROCESS(COMMAND chmod a+x ${abs_target})
+    EXECUTE_PROCESS(COMMAND chmod a+x $ENV{DESTDIR}/${abs_target})

This looks wrong; I don't think you can safely add the / without 
checking if $ENV{DESTDIR} is empty or not. (Remember that the absolute 
paths /usr and //usr are not required to be the same!)

-- 
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
-- 
"You know what Microsoft's problem really is? They've lost the ability 
to feel ashamed." -- Pamela Jones (Groklaw)



More information about the Kde-buildsystem mailing list