aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorchocolateboy <chocolate@cpan.org>2013-05-10 22:47:37 +0100
committerchocolateboy <chocolate@cpan.org>2013-05-10 23:05:58 +0100
commit5738240ee829684815bdb9e6a9028d3465140b48 (patch)
tree3bbcc076f4fd3271aa9d2c5f0c281440daeb4d0f /Makefile
parent86fd453ea8f9b65f6b1aded22ccc802292159cf3 (diff)
only install to /etc if PREFIX is /usr or /usr/local
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
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)