1 all: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion
4 rm -rf youtube-dl.1.temp.md youtube-dl.1 youtube-dl.bash-completion README.txt MANIFEST build/ dist/ .coverage cover/ youtube-dl.tar.gz
7 rm -f youtube-dl youtube-dl.exe
10 BINDIR ?= $(PREFIX)/bin
11 MANDIR ?= $(PREFIX)/man
12 PYTHON ?= /usr/bin/env python
14 # set SYSCONFDIR to /etc if PREFIX=/usr or PREFIX=/usr/local
18 ifeq ($(PREFIX),/usr/local)
21 SYSCONFDIR=$(PREFIX)/etc
25 install: youtube-dl youtube-dl.1 youtube-dl.bash-completion
26 install -d $(DESTDIR)$(BINDIR)
27 install -m 755 youtube-dl $(DESTDIR)$(BINDIR)
28 install -d $(DESTDIR)$(MANDIR)/man1
29 install -m 644 youtube-dl.1 $(DESTDIR)$(MANDIR)/man1
30 install -d $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
31 install -m 644 youtube-dl.bash-completion $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/youtube-dl
34 #nosetests --with-coverage --cover-package=youtube_dl --cover-html --verbose --processes 4 test
35 nosetests --verbose test
37 tar: youtube-dl.tar.gz
39 .PHONY: all clean install test tar bash-completion pypi-files
41 pypi-files: youtube-dl.bash-completion README.txt youtube-dl.1
43 youtube-dl: youtube_dl/*.py youtube_dl/*/*.py
44 zip --quiet youtube-dl youtube_dl/*.py youtube_dl/*/*.py
45 zip --quiet --junk-paths youtube-dl youtube_dl/__main__.py
46 echo '#!$(PYTHON)' > youtube-dl
47 cat youtube-dl.zip >> youtube-dl
51 README.md: youtube_dl/*.py youtube_dl/*/*.py
52 COLUMNS=80 python -m youtube_dl --help | python devscripts/make_readme.py
55 pandoc -f markdown -t plain README.md -o README.txt
57 youtube-dl.1: README.md
58 python devscripts/prepare_manpage.py >youtube-dl.1.temp.md
59 pandoc -s -f markdown -t man youtube-dl.1.temp.md -o youtube-dl.1
60 rm -f youtube-dl.1.temp.md
62 youtube-dl.bash-completion: youtube_dl/*.py youtube_dl/*/*.py devscripts/bash-completion.in
63 python devscripts/bash-completion.py
65 bash-completion: youtube-dl.bash-completion
67 youtube-dl.tar.gz: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion
68 @tar -czf youtube-dl.tar.gz --transform "s|^|youtube-dl/|" --owner 0 --group 0 \
69 --exclude '*.DS_Store' \
70 --exclude '*.kate-swp' \
74 --exclude '__pycache' \
76 --exclude 'testdata' \
77 --exclude 'docs/_build' \
79 bin devscripts test youtube_dl docs \
80 LICENSE README.md README.txt \
81 Makefile MANIFEST.in youtube-dl.1 youtube-dl.bash-completion setup.py \