From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 2BEF87B1DB for ; Fri, 27 Dec 2019 12:26:52 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id f129so9198035wmf.2 for ; Fri, 27 Dec 2019 12:26:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=geoffair-info.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=oMpfRomKG67mcslOhc5QYDY68ibh1burennsobcp+7g=; b=GC9TmFROgQQrOFlkHoY31L2wkpagUeeCKfO675+B2LrP1X1AaXG2g6Khy2P/Manxks 3jweVPtVSQtRfMGe0Bv4oyjpKf+IVMtfu5IhrnGWvPIjQ3kB3av0+2AgHDaKaB18g1S3 J9lCwxYSxfZJk9fyepS/FirCb0L6TaOpt9Y7sWs9QlFE/9Lr4/Xbf9uq+56dEg7CWgKx NlyCpvnxO8f1qxJho6ZoiR5GmK2rw09s7WYKeMleRtEkmMyGMnMUHvoiBKIVpDhmtovj 4rfOelbuTTjTJP/OCEzArV3HjwTXuJxb+s/KrvBah8TFRo+Tl1JBP9hHZ/Oi2/rsSATH wvtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=oMpfRomKG67mcslOhc5QYDY68ibh1burennsobcp+7g=; b=llJ4g6v1MYWkh+hB/c9yOy1TvwNp/HWvJup65QLXXgNoFTje11MS37CYe/ZNA0Fd5x 3VaD/S7Neo7DtN6OAXsQky9b78KhUh9UsBgEkq0fqbaDdwQ1JBkQfab/M9NqQ1cmsrtI E8ysTI8NUql6+RLlMdr+k66KcX+Qtt5GwLkXGH/9uEbTn2xnvleSBi/7UvLCqGQM3+dw jZ2JZ7wkURuIlKafaY1s8suj3xc1WLiq/NkuWxYaA+RC1nAQH+WxA2AMFeXYs5QXXoTy aFkiN7ONhe5zPi05Qd1hOoU56871Pw4hw0ORNHKXFEmUsSwF6N9DJ8ulM0yCma8pbYGM pFOg== X-Gm-Message-State: APjAAAVD6TTXdk120IoANXFwIcC8mE/t5cbFkB9GojzLe42hY6C+lD1Z EBpK4jhj6pHq8nROwgsqgaCncw== X-Google-Smtp-Source: APXvYqyG8zZDhhYAD8L6wUeWr1QcrKi0opw4g89CMnGvcvgPt1nR9qibhy/Ek2cdVCiSMsO7otO6ow== X-Received: by 2002:a1c:dc08:: with SMTP id t8mr21438451wmg.139.1577478410547; Fri, 27 Dec 2019 12:26:50 -0800 (PST) Received: from ?IPv6:2a01:cb04:4ba:c500:4f8:dfaa:789f:3c3? (2a01cb0404bac50004f8dfaa789f03c3.ipv6.abo.wanadoo.fr. [2a01:cb04:4ba:c500:4f8:dfaa:789f:3c3]) by smtp.googlemail.com with ESMTPSA id h66sm12893079wme.41.2019.12.27.12.26.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 27 Dec 2019 12:26:49 -0800 (PST) Subject: Re: [edbrowse-dev] documentation respecting install prefix in cmake To: "alf.siciliano@gmail.com" , edbrowse-dev@edbrowse.org Cc: Adam Thompson , Dominique Martinet References: <20191225133640.GA74927@toaster> <20191225134715.GA11932@nautica> <20191225140551.GB93806@toaster> <20191225162952.GA2846@nautica> <9247904b-0fb1-95c4-18cb-86f279dbfc98@geoffair.info> <20191226184323.GA4808@toaster> <460ad829-de45-7788-f776-bcd37c65a0de@geoffair.info> <20191226205100.GA26919@nautica> <20191227165800.7bdad9dd717c43b644a81f79@gmail.com> From: Geoff McLane Message-ID: <91f77e4e-865c-182a-5f66-950c685025a8@geoffair.info> Date: Fri, 27 Dec 2019 21:26:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 X-BeenThere: edbrowse-dev@edbrowse.org List-Id: Edbrowse Development List MIME-Version: 1.0 In-Reply-To: <20191227165800.7bdad9dd717c43b644a81f79@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Hi Dominique, Adam, Alfonso, Thanks for the holiday wishes... you all, enjoy... I might not know unix very well, but trying to continue to learn... but I do know cmake quite well, for quite a long time... over many cmake versions, back before say 2.6.4 of circa 2009... And I reminded myself of why even -     set (UnixManDir "${CMAKE_INSTALL_PREFIX}/share/man/man1")     set (UnixDocDir "${CMAKE_INSTALL_PREFIX}/share/doc/edbrowse") is wrong... Not quite as wrong as -     set (UnixManDir "/usr/share/man/man1")     set (UnixDocDir "/usr/share/doc/edbrowse") but still wrong, in principal... The CMake principal: If the path, in the cmake install line, after the keyword DESTINATION, begins with a forward slash, /, then cmake will treat it as an absolute path... And thus when generating the cmake_install.cmake will add a warning/error, if asked with -DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION... about using an absolute path... so devs can check before installs... This condition should be avoided, even if your patch does generate an acceptable absolute path... This should be a relative path, to the CMAKE_INSTALL_PREFIX, like     set (UnixManDir "share/man/man1")     set (UnixDocDir "share/doc/edbrowse") And yes, that relative path can be adjusted for specific distros... like add/sub the 'share' part, if need be, but always remain relative to the /ROOT/... Then the ugly cmake warning/error is /not/ generated... and all install files goto the CMAKE_INSTALL_PREFIX... what ever the distro default, or user choice, is... and nowhere else... And now begin to think even html tidy's use of MAN_INSTALL_DIR is also not quite right... but seems to work, without the absolute message... but now do /NOT/ suggest it... And yes, this is all tied up to the auto-make tools, which have ENV vars, like MANDIR, DOCDIR, ..., which can still be used... with cmake... Which leads to the GNUInstallDirs, with monstrosities like CMAKE_INSTALL_MANDIR and CMAKE_INSTALL_DOCDIR... and/or, as Alfonso suggests, maybe CMAKE_INSTALL_FULL_MANDIR/DOCDIR... which again seems best to avoid... So I think edbrowse CMakeLists.txt should stick to using a simple relative path only... for maximum compatibility... Anyway, that's my added 2 cents... ;=)) Regards, Geoff.