1 all: youtube-dl README.md CONTRIBUTING.md README.txt youtube-dl.1 youtube-dl.bash-completion youtube-dl.zsh youtube-dl.fish supportedsites
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 youtube-dl.zsh youtube-dl.fish *.dump *.part *.info.json CONTRIBUTING.md.tmp
7 rm -f youtube-dl youtube-dl.exe
10 BINDIR ?= $(PREFIX)/bin
11 MANDIR ?= $(PREFIX)/man
12 SHAREDIR ?= $(PREFIX)/share
13 PYTHON ?= /usr/bin/env python
15 # set SYSCONFDIR to /etc if PREFIX=/usr or PREFIX=/usr/local
19 ifeq ($(PREFIX),/usr/local)
22 SYSCONFDIR=$(PREFIX)/etc
26 install: youtube-dl youtube-dl.1 youtube-dl.bash-completion youtube-dl.zsh youtube-dl.fish
27 install -d $(DESTDIR)$(BINDIR)
28 install -m 755 youtube-dl $(DESTDIR)$(BINDIR)
29 install -d $(DESTDIR)$(MANDIR)/man1
30 install -m 644 youtube-dl.1 $(DESTDIR)$(MANDIR)/man1
31 install -d $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
32 install -m 644 youtube-dl.bash-completion $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/youtube-dl
33 install -d $(DESTDIR)$(SHAREDIR)/zsh/site-functions
34 install -m 644 youtube-dl.zsh $(DESTDIR)$(SHAREDIR)/zsh/site-functions/_youtube-dl
35 install -d $(DESTDIR)$(SYSCONFDIR)/fish/completions
36 install -m 644 youtube-dl.fish $(DESTDIR)$(SYSCONFDIR)/fish/completions/youtube-dl.fish
42 #nosetests --with-coverage --cover-package=youtube_dl --cover-html --verbose --processes 4 test
43 nosetests --verbose test
49 nosetests --verbose test --exclude test_download --exclude test_age_restriction --exclude test_subtitles --exclude test_write_annotations --exclude test_youtube_lists
51 tar: youtube-dl.tar.gz
53 .PHONY: all clean install test tar bash-completion pypi-files zsh-completion fish-completion ot offlinetest codetest supportedsites
55 pypi-files: youtube-dl.bash-completion README.txt youtube-dl.1 youtube-dl.fish
57 youtube-dl: youtube_dl/*.py youtube_dl/*/*.py
58 zip --quiet youtube-dl youtube_dl/*.py youtube_dl/*/*.py
59 zip --quiet --junk-paths youtube-dl youtube_dl/__main__.py
60 echo '#!$(PYTHON)' > youtube-dl
61 cat youtube-dl.zip >> youtube-dl
65 README.md: youtube_dl/*.py youtube_dl/*/*.py
66 COLUMNS=80 python youtube_dl/__main__.py --help | python devscripts/make_readme.py
68 CONTRIBUTING.md: README.md
69 python devscripts/make_contributing.py README.md CONTRIBUTING.md
72 python devscripts/make_supportedsites.py docs/supportedsites.md
75 pandoc -f markdown -t plain README.md -o README.txt
77 youtube-dl.1: README.md
78 python devscripts/prepare_manpage.py >youtube-dl.1.temp.md
79 pandoc -s -f markdown -t man youtube-dl.1.temp.md -o youtube-dl.1
80 rm -f youtube-dl.1.temp.md
82 youtube-dl.bash-completion: youtube_dl/*.py youtube_dl/*/*.py devscripts/bash-completion.in
83 python devscripts/bash-completion.py
85 bash-completion: youtube-dl.bash-completion
87 youtube-dl.zsh: youtube_dl/*.py youtube_dl/*/*.py devscripts/zsh-completion.in
88 python devscripts/zsh-completion.py
90 zsh-completion: youtube-dl.zsh
92 youtube-dl.fish: youtube_dl/*.py youtube_dl/*/*.py devscripts/fish-completion.in
93 python devscripts/fish-completion.py
95 fish-completion: youtube-dl.fish
97 youtube-dl.tar.gz: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion youtube-dl.zsh youtube-dl.fish
98 @tar -czf youtube-dl.tar.gz --transform "s|^|youtube-dl/|" --owner 0 --group 0 \
99 --exclude '*.DS_Store' \
100 --exclude '*.kate-swp' \
104 --exclude '__pycache' \
106 --exclude 'testdata' \
107 --exclude 'docs/_build' \
109 bin devscripts test youtube_dl docs \
110 LICENSE README.md README.txt \
111 Makefile MANIFEST.in youtube-dl.1 youtube-dl.bash-completion \
112 youtube-dl.zsh youtube-dl.fish setup.py \