edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Geoff McLane <ubuntu@geoffair.info>
To: "alf.siciliano@gmail.com" <alf.siciliano@gmail.com>,
Cc: Adam Thompson <arthompson1990@gmail.com>,
	Dominique Martinet <asmadeus@codewreck.org>
Subject: Re: [edbrowse-dev] documentation respecting install prefix in cmake
Date: Fri, 27 Dec 2019 21:26:48 +0100	[thread overview]
Message-ID: <91f77e4e-865c-182a-5f66-950c685025a8@geoffair.info> (raw)
In-Reply-To: <20191227165800.7bdad9dd717c43b644a81f79@gmail.com>

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 
about using an absolute path... so devs can check before installs...

This condition should be avoided, even if your patch does generate an 
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 
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
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.

  reply	other threads:[~2019-12-27 20:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-25 13:36 Adam Thompson
2019-12-25 13:47 ` Dominique Martinet
2019-12-25 14:05   ` Adam Thompson
2019-12-25 16:29     ` Dominique Martinet
2019-12-25 17:42       ` Geoff McLane
2019-12-26 18:43         ` Adam Thompson
2019-12-26 20:31           ` Geoff McLane
2019-12-26 20:51             ` Dominique Martinet
2019-12-27 15:58               ` alf.siciliano
2019-12-27 20:26                 ` Geoff McLane [this message]
2020-01-16 20:28                   ` Adam Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=91f77e4e-865c-182a-5f66-950c685025a8@geoffair.info \
    --to=ubuntu@geoffair.info \
    --cc=alf.siciliano@gmail.com \
    --cc=arthompson1990@gmail.com \
    --cc=asmadeus@codewreck.org \
    --cc=edbrowse-dev@edbrowse.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).