falkTX / Carla

Audio plugin host
https://kx.studio/carla
1.55k stars 144 forks source link

Attempts to change permissions on bin directory #1863

Open hackerb9 opened 4 months ago

hackerb9 commented 4 months ago

The target install_main in the Makefile currently runs install -d /usr/local/bin as its first step. However, at some sites that will fail even though the directory exists and is writable. For example:

$ ls -ld /usr/local/bin
drwxrwsr-x 2 root staff 4096 Feb 12 11:01 /usr/local/bin
$ make install
install: cannot change permissions of ‘/usr/local/bin’: Operation not permitted

A simple solution is to only attempt to create the bin directory if it is missing:

-install_main:
-   # Create directories
+ $(DESTDIR)$(BINDIR):
        install -d $(DESTDIR)$(BINDIR)
+
+install_main:  $(DESTDIR)$(BINDIR)
+ # Create directories
        install -d $(DESTDIR)$(DATADIR)/carla/resources

P.S. I like your clean Makefile style build system. The make features target is a nice touch.