From: Philipp Hagemeister Date: Mon, 13 May 2013 07:42:24 +0000 (-0700) Subject: Merge pull request #834 from chocolateboy/install_prefix_fix X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=c1d58e1c67106e2f65fdd38fc4db99af19a647ce;hp=02030ff7fe47a0f1e6a75a50a2d76b3154545dc2;p=youtube-dl Merge pull request #834 from chocolateboy/install_prefix_fix only install to /etc if PREFIX is /usr or /usr/local --- diff --git a/Makefile b/Makefile index 84ea70d2c..e00f5e650 100644 --- a/Makefile +++ b/Makefile @@ -9,9 +9,19 @@ cleanall: clean PREFIX=/usr/local BINDIR=$(PREFIX)/bin MANDIR=$(PREFIX)/man -SYSCONFDIR=/etc PYTHON=/usr/bin/env python +# set SYSCONFDIR to /etc if PREFIX=/usr or PREFIX=/usr/local +ifeq ($(PREFIX),/usr) + SYSCONFDIR=/etc +else + ifeq ($(PREFIX),/usr/local) + SYSCONFDIR=/etc + else + SYSCONFDIR=$(PREFIX)/etc + endif +endif + install: youtube-dl youtube-dl.1 youtube-dl.bash-completion install -d $(DESTDIR)$(BINDIR) install -m 755 youtube-dl $(DESTDIR)$(BINDIR)