install: all
echo "INSTALL"
- $(INSTALL) -d -m 0755 $(DESTDIR)/usr/bin
- $(INSTALL) -d -m 0755 $(DESTDIR)/etc/i3
- $(INSTALL) -d -m 0755 $(DESTDIR)/usr/include/i3
- $(INSTALL) -d -m 0755 $(DESTDIR)/usr/share/xsessions
- $(INSTALL) -m 0755 i3 $(DESTDIR)/usr/bin/
- test -e $(DESTDIR)/etc/i3/config || $(INSTALL) -m 0644 i3.config $(DESTDIR)/etc/i3/config
- $(INSTALL) -m 0644 i3.welcome $(DESTDIR)/etc/i3/welcome
- $(INSTALL) -m 0644 i3.desktop $(DESTDIR)/usr/share/xsessions/
- $(INSTALL) -m 0644 include/i3/ipc.h $(DESTDIR)/usr/include/i3/
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(SYSCONFDIR)/i3
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/include/i3
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/xsessions
+ $(INSTALL) -m 0755 i3 $(DESTDIR)$(PREFIX)/bin/
+ test -e $(DESTDIR)$(SYSCONFDIR)/i3/config || $(INSTALL) -m 0644 i3.config $(DESTDIR)$(SYSCONFDIR)/i3/config
+ $(INSTALL) -m 0644 i3.welcome $(DESTDIR)$(SYSCONFDIR)/i3/welcome
+ $(INSTALL) -m 0644 i3.desktop $(DESTDIR)$(PREFIX)/share/xsessions/
+ $(INSTALL) -m 0644 include/i3/ipc.h $(DESTDIR)$(PREFIX)/include/i3/
$(MAKE) TOPDIR=$(TOPDIR) -C i3-msg install
$(MAKE) TOPDIR=$(TOPDIR) -C i3-input install
UNAME=$(shell uname)
DEBUG=1
INSTALL=install
+PREFIX=/usr
+ifeq ($(PREFIX),/usr)
+SYSCONFDIR=/etc
+else
+SYSCONFDIR=$(PREFIX)/etc
+endif
GIT_VERSION:="$(shell git describe --tags --always) ($(shell git log --pretty=format:%cd --date=short -n1))"
VERSION:=$(shell git describe --tags --abbrev=0)
install: all
echo "INSTALL"
- $(INSTALL) -d -m 0755 $(DESTDIR)/usr/bin
- $(INSTALL) -m 0755 i3-input $(DESTDIR)/usr/bin/
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) -m 0755 i3-input $(DESTDIR)$(PREFIX)/bin/
clean:
rm -f *.o
install: all
echo "INSTALL"
- $(INSTALL) -d -m 0755 $(DESTDIR)/usr/bin
- $(INSTALL) -m 0755 i3-msg $(DESTDIR)/usr/bin/
+ $(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
+ $(INSTALL) -m 0755 i3-msg $(DESTDIR)$(PREFIX)/bin/
clean:
rm -f *.o