From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 626967B1DB for ; Thu, 26 Dec 2019 10:43:28 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id j42so24249560wrj.12 for ; Thu, 26 Dec 2019 10:43:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=ixdWvRu9gfTh+WOKj95e/oIJfM4Oum+0SICgLSO38eE=; b=C/ulPqFBkkdV9H/qZHQZjLjRZx1bTuD3KobPqZL5juhrsW3/JqzPCsmzYatzy/4lgw GnZEPf8nVyPoN29OpBWBCa53/Y+6oK/XO3YvmjIrYH77hucWPbiK0/boEDy/P7GgWmTK ILs7gasoInydfQoelP49YubZ2GU95GRvdvqdHbFccyUIY32TEmtzjowbJf7q6Y+Cwwzm YBjt01pdzBlgLHyAwbO5OdSAfCNQjFibZs3s6Qz8VKZatXtrObSg6DUHm24S5GWYbjMO m6Fl00b1ephvK/H9rsKQdOTrRW/B4WJINt4eNCWgn8rwxxQyd8YY93xpaPVOr30Yam4I hdCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=ixdWvRu9gfTh+WOKj95e/oIJfM4Oum+0SICgLSO38eE=; b=Pxal5nPoP5FL7vmm0AhhPH5xP697Nb14fXmt9TOFl49auME+l0NI+vnl0TGzwsBo6P d93KTN0Kk36qosxwtukdQh5FxsfeBK3ayha4hld/RM2GN4TEw+LGbvBMd6gsSER+RxWQ RYCP/WXOKTWzNV/Br6ap0EZDt2F0pgQFvw7TAAMgeCukDAJIRuem/XGjZHyt8tAJiE5Z 4ZVnhBmN7YCGQQ9OwHnwahwLMOlgp77XrGRe9N4KBoo9EIjIKv4ngxmtMx9BBtb58Q5K 0qF3jKVxv/HUQDNBgb3r9pXVV01A5jxlvwWYbQwqtX+YlrUqwXIj+XEG+5X8NiSOwy5m 4I5Q== X-Gm-Message-State: APjAAAWy8uMs5wWsLt3YVxiqUj0lvAasVrdWRps2VA3FH0TaWwVuK3a6 qCuDwTejds1dfAhsYOx2uj8= X-Google-Smtp-Source: APXvYqwzXe6AxlKjl93gPhgxFVGFU70e5tu9o83z7O3JD8PCqXp34KNZQ0nvZ2TgONWlOZciiZ3THQ== X-Received: by 2002:a5d:6703:: with SMTP id o3mr2092127wru.235.1577385806391; Thu, 26 Dec 2019 10:43:26 -0800 (PST) Received: from toaster ([86.9.161.187]) by smtp.gmail.com with ESMTPSA id z8sm31416172wrq.22.2019.12.26.10.43.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Dec 2019 10:43:25 -0800 (PST) Date: Thu, 26 Dec 2019 18:43:23 +0000 From: Adam Thompson To: Geoff McLane Cc: Dominique Martinet , edbrowse-dev@edbrowse.org Subject: Re: [edbrowse-dev] documentation respecting install prefix in cmake Message-ID: <20191226184323.GA4808@toaster> References: <20191225133640.GA74927@toaster> <20191225134715.GA11932@nautica> <20191225140551.GB93806@toaster> <20191225162952.GA2846@nautica> <9247904b-0fb1-95c4-18cb-86f279dbfc98@geoffair.info> X-BeenThere: edbrowse-dev@edbrowse.org List-Id: Edbrowse Development List MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9247904b-0fb1-95c4-18cb-86f279dbfc98@geoffair.info> On Wed, Dec 25, 2019 at 06:42:48PM +0100, Geoff McLane wrote: > Yes, I add my own CMAKE_INSTALL_PREFIX, to my $HOME directory... > but see, in the output, if I do `$ sudo make install`, >  `-- Installing: /usr/share/man/man1/edbrowse.1.gz`, > so it seems, when CMake generates the `Unix Makfile` build, it has > chosen other than my suggested install directory... for this `man` > component... hmmm, why? That is NOT GOOD... > > I can see, in that `UNIX Makfile` generation, it also gens > a `cmake_install.cmake`, and runs cmake on that if given the `install` > target... > > And as pointed out, this is HARD CODED in the CMakeLists.txt as - > if (UNIX) >     FILE (GLOB UnixManFile "doc/man-edbrowse-debian.1") >     set (UnixManDir "/usr/share/man/man1") >     set (UnixDocDir "/usr/share/doc/edbrowse") >     if (${CMAKE_SYSTEM_NAME} STREQUAL  "FreeBSD") >     FILE (GLOB UnixManFile "doc/man-edbrowse-freebsd.1") >         set (UnixManDir "/usr/local/man/man1") >         set (UnixDocDir "/usr/local/share/doc/edbrowse") >     endif() > ... > > Why so very HARD CODED defaults... That could be changed, modified, > enhanced, etc... To work with some very old or odd version of cmake? > In the html-tidy tidy.1 generation/install, we have a MAN_INSTALL_DIR > override option, > but otherwise let cmake choose a default... which seems to default to - > "${CMAKE_INSTALL_PREFIX}/share/man/man1" > so, without that override, honors the users CMAKE_INSTALL_PREFIX... the > default > being "/usr/local"... > > So I certainly think there could be some CMakeLists.txt patches here... will > try to experiment... soonest... suggestions welcome... Does pulling the entire setting work? Let cmake "do the right thing" and see if that's sufficient? Or are there old versions of cmake we need to support which require this? > And Dominique, your patch does some of this, but still question why > does edbrowse wants to define its own target UnixManDir... cmake has > defaults > like MAN_INSTALL_DIR... > > Try setting CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION and you will see > what I mean... on install... no go... Interesting, I didn't know that was a thing... I clearly need to familiarise myself with cmake at some stage fairly soon. > As a developer, I need to be able to install-where-I-want, > 100% ... to be able to check, inspect, try, test, ... even in > /tmp/rubbish... > and /NOTHING/ must be written /anywhere/ else... full stop... > > So suggest the CMakeLists.txt patch go deeper... see html-tidy > CMakeList.txt, > where we use the xsltproc generated, big tidy.1, and install it... Agreed. > But Adam, do not fully understand your original comment - > > that I specified the install prefix as /usr/local to avoid any issues with > packages. > > First, as I understand it, that /IS/ the cmake default, so no need to add > it... Not in build-me.sh. That seems to default to home directory and, as I said, I was unaware of cmake's defaults (ee previous comments about my almost total lack of cmake knowledge). > But what do you mean by `issues with packages`! What issues, with what > packages, are > you trying to avoid... maybe we can address those... Not really. Basically Debian packages Edbrowse. Generally I try and avoid having both installed at once (see library sadness from my previous emails) but it's sometimes useful to be able to install the distro-packaged version to check if something's gone wrong with my build. In addition, since this is my main browser, it's useful to be able to install the distro package in the event that something's not working with my build. In both cases it's important that there's no overlapping files to avoid any issues with either files being deleted or the package manager getting upset because of an overwritten packaged file. Generally dpkg seems to handle this stuff fairly well. However, speaking from my experience in my day job, it's almost always a good idea to keep packaged and unpackaged software from playing with each other's installed files. > As an aside, it is certainly time to update the man-edbrowse-debian.1 line > .TH edbrowse 1 2018-05-01 "edbrowse 3.7.3" > > But that is off topic... Yeah... as you say a little off-topic but that can certainly be done fairly easily. Not sure if there're any changes which need to go in elsewhere in the manpage (will have a look later today). Cheers, Adam.