Commit Graph

10 Commits

Author SHA1 Message Date
Franklin Mathieu
3ce97879d0 cmake,bsd: Fix mandir to saner defaults. (#7417)
closes #7239

The old behaviour was to set CMAKE_INSTALL_MANDIR to /usr/local/man
when MANPREFIX wasn't defined. This caused mismatching installation
paths when the installation prefix wasn't /usr/local.

This fix explicitely checks that the prefix is /usr/local to change
the value of CMAKE_INSTALL_MANDIR, and uses the default behaviour
otherwise, as /usr/local is the exception rather than the norm
(as per man hier(7)).
2017-10-21 02:36:26 +02:00
Justin M. Keyes
a84926763f install: bsd: install manpages to /usr/local/man
https://svnweb.freebsd.org/ports/head/editors/neovim/Makefile?revision=428479&view=markup#l28

Closes #6771
2017-05-27 21:42:10 +02:00
Michael Reed
aa1d9a1807 Build: Use GNUInstallDirs, install man pages #2649
For now, only install man pages matching "nvim*.1": we don't want to
install xxd.1 as it might conflict with that of a user's Vim
installation.

closes #1826

Reviewed-by: Florian Walch <florian@fwalch.com>
Helped-by: John Szakmeister <john@szakmeister.net>
2015-05-17 14:57:43 -04:00
John Szakmeister
6e87557c08 build: allow installing into the root directory (/)
It turns out that CMake always canonicalizes `CMAKE_INSTALL_PREFIX` to
an absolute path--if it's a relative path, it canonicalizes it relative
to the build directory.  As a result, the only thing the DESTDIR and
relative directory check prevents is an installation into the root
directory since CMake strips the trailing slash, turning "/" into an
empty string.  Let's just remove the check all together, since it cannot
accomplish what we intended.
2014-11-09 17:48:19 -05:00
John Szakmeister
938faf5e2d build: fix the usage of DESTDIR in InstallHelpers.cmake
It turns out that `file(INSTALL ...)` already accounts for `DESTDIR`, so
this wasn't creating the directory structure in the correct location.
Instead, we need to do our existence check with `DESTDIR`, but leave it
off when doing the install step.

While we're at it, add a check to make sure `ENV{DESTDIR}` is not being
used with a relative path, as that construct doesn't make much sense.

This fixes issue #1387 discovered while trying to make helptag
generation work correctly in #1381.
2014-11-08 16:55:15 -05:00
Florian Walch
cc7199f0e5 CMake: Fix helptags generation. 2014-11-03 19:46:40 +01:00
Florian Walch
3fa28d2ba5 Revert "Merge pull request #1381 from xzfc/master"
This reverts commit 6c0a596dac, reversing
changes made to 33d3a7c83b.
2014-11-03 18:07:56 +01:00
Albert Safin
62ede403f0 CMake: Fix checking of DESTDIR 2014-11-03 19:05:46 +06:00
Florian Walch
0b775e3513 CMake: Set execute permissions during installation. 2014-10-20 15:07:14 +02:00
John Szakmeister
0d35369324 build: install with the correct permissions
The install() command will create the parent directories, but it does so
with the user's umask.  We want to do our best to make sure the correct
permissions are being set, without clobbering existing permissions.

To do this, this commit introduces an install_helper(), which is similar
in signature to the install() command, to help ensure that directories
are created ahead of the actual install() command.  This will attempt to
use 0644 permissions for files and 0755 permissions for directories by
default--though they can be overridden.

To make this work correctly, without trying to introduce some mechanism
with setting the umask, it meant that there's a small portion that makes
use of an "internal" version of the file() command.  It has been tested
on CMake 2.8.11, 2.8.12, and 3.0.2, and works correctly on all versions.

This fixes #1201 and #1086.
2014-09-22 05:56:52 -04:00