neovim/neovim — pull request #1201 by justinmk (2014-09-19 01:44:39+00:00)
Title: [RFC] build: ensure umask 0022 during `make install`

I noticed that `sudo make install` doesn't allow non-root users access to `/usr/local/share/nvim/`. This is because my `.bashrc` defaults to `umask 0077`. `sudo` inherits this (unless `umask_override` is [configured](http://superuser.com/a/315115/114842)) and that causes `sudo make install` to create files that are unreadable by non-root users.

One could argue that people running with a restrictive `umask` should deal with this on their own, but `apt-get` doesn't have this problem, and it's probably a good idea to make the install step as robust as possible--assuming there's no surprising or undesirable side effects.

CMake doesn't seem to allow detection of the "current target", so I can't do something like:

```
if (TARGET MATCHES install)
...
endif()
```

If anyone knows a better way to handle this, or knows of any problems this could cause, let me know.