flame/blis — pull request #19 by kevinoid (2014-08-03 19:03:50+00:00)
Title: Fix permissions error installing to non-owned directory

Hi BLIS Team,

Thanks for all of your work on this project, it's very impressive! I just ran into an error installing BLIS to `/usr/local` on my system and thought it may be a use case that you'd like to support. To that end, here's a PR to describe/address it:

When installing to a directory which is not owned by the installing user, even when the user has write permission for the directory, the installation can fail with an error similar to the following:

```
Installing libblis-0.1.4-7-sandybridge.a into /usr/local/lib/
install: cannot change permissions of ‘/usr/local/lib’: Operation not permitted
Makefile:658: recipe for target '/usr/local/lib/libblis-0.1.4-7-sandybridge.a' failed
make: *** [/usr/local/lib/libblis-0.1.4-7-sandybridge.a] Error 1
```

In the example case, the error occurred because the user attempted to install to `/usr/local` and `/usr/local/lib` is owned by root with mode 2755 which the Makefile unsuccessfully attempted to change to 0755.

Given that installing to `/usr/local` is likely to be quite common and the ownership/permissions are the default for Debian and Debian-derived Linux distributions (perhaps others as well), this commit attempts to
support that use case by using `mkdir` rather than `install` to create the directory (which is the same approach as Automake).

I hope you find it useful.

Thanks for considering,
Kevin