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 youtube_dl/extractor/lazy_extractors.py *.dump *.part *.info.json *.mp4 *.m4a *.flv *.mp3 *.avi *.mkv *.webm *.jpg *.png CONTRIBUTING.md.tmp ISSUE_TEMPLATE.md.tmp youtube-dl youtube-dl.exe
5 find . -name "*.pyc" -delete
6 find . -name "*.class" -delete
9 BINDIR ?= $(PREFIX)/bin
10 MANDIR ?= $(PREFIX)/man
11 SHAREDIR ?= $(PREFIX)/share
12 PYTHON ?= /usr/bin/env python
14 # set SYSCONFDIR to /etc if PREFIX=/usr or PREFIX=/usr/local
15 SYSCONFDIR != if [ $(PREFIX) = /usr -o $(PREFIX) = /usr/local ]; then echo /etc; else echo $(PREFIX)/etc; fi
17 install: youtube-dl youtube-dl.1 youtube-dl.bash-completion youtube-dl.zsh youtube-dl.fish
18 install -d $(DESTDIR)$(BINDIR)
19 install -m 755 youtube-dl $(DESTDIR)$(BINDIR)
20 install -d $(DESTDIR)$(MANDIR)/man1
21 install -m 644 youtube-dl.1 $(DESTDIR)$(MANDIR)/man1
22 install -d $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
23 install -m 644 youtube-dl.bash-completion $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/youtube-dl
24 install -d $(DESTDIR)$(SHAREDIR)/zsh/site-functions
25 install -m 644 youtube-dl.zsh $(DESTDIR)$(SHAREDIR)/zsh/site-functions/_youtube-dl
26 install -d $(DESTDIR)$(SYSCONFDIR)/fish/completions
27 install -m 644 youtube-dl.fish $(DESTDIR)$(SYSCONFDIR)/fish/completions/youtube-dl.fish
33 #nosetests --with-coverage --cover-package=youtube_dl --cover-html --verbose --processes 4 test
34 nosetests --verbose test
40 $(PYTHON) -m nose --verbose test --exclude test_download.py --exclude test_age_restriction.py --exclude test_subtitles.py --exclude test_write_annotations.py --exclude test_youtube_lists.py --exclude test_iqiyi_sdk_interpreter.py --exclude test_socks.py
42 tar: youtube-dl.tar.gz
44 .PHONY: all clean install test tar bash-completion pypi-files zsh-completion fish-completion ot offlinetest codetest supportedsites
46 pypi-files: youtube-dl.bash-completion README.txt youtube-dl.1 youtube-dl.fish
48 youtube-dl: youtube_dl/*.py youtube_dl/*/*.py
49 zip --quiet youtube-dl youtube_dl/*.py youtube_dl/*/*.py
50 zip --quiet --junk-paths youtube-dl youtube_dl/__main__.py
51 echo '#!$(PYTHON)' > youtube-dl
52 cat youtube-dl.zip >> youtube-dl
56 README.md: youtube_dl/*.py youtube_dl/*/*.py
57 COLUMNS=80 $(PYTHON) youtube_dl/__main__.py --help | $(PYTHON) devscripts/make_readme.py
59 CONTRIBUTING.md: README.md
60 $(PYTHON) devscripts/make_contributing.py README.md CONTRIBUTING.md
62 .github/ISSUE_TEMPLATE.md: devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl.md youtube_dl/version.py
63 $(PYTHON) devscripts/make_issue_template.py .github/ISSUE_TEMPLATE_tmpl.md .github/ISSUE_TEMPLATE.md
66 $(PYTHON) devscripts/make_supportedsites.py docs/supportedsites.md
69 pandoc -f markdown -t plain README.md -o README.txt
71 youtube-dl.1: README.md
72 $(PYTHON) devscripts/prepare_manpage.py youtube-dl.1.temp.md
73 pandoc -s -f markdown -t man youtube-dl.1.temp.md -o youtube-dl.1
74 rm -f youtube-dl.1.temp.md
76 youtube-dl.bash-completion: youtube_dl/*.py youtube_dl/*/*.py devscripts/bash-completion.in
77 $(PYTHON) devscripts/bash-completion.py
79 bash-completion: youtube-dl.bash-completion
81 youtube-dl.zsh: youtube_dl/*.py youtube_dl/*/*.py devscripts/zsh-completion.in
82 $(PYTHON) devscripts/zsh-completion.py
84 zsh-completion: youtube-dl.zsh
86 youtube-dl.fish: youtube_dl/*.py youtube_dl/*/*.py devscripts/fish-completion.in
87 $(PYTHON) devscripts/fish-completion.py
89 fish-completion: youtube-dl.fish
91 lazy-extractors: youtube_dl/extractor/lazy_extractors.py
93 _EXTRACTOR_FILES != find youtube_dl/extractor -iname '*.py' -and -not -iname 'lazy_extractors.py'
94 youtube_dl/extractor/lazy_extractors.py: devscripts/make_lazy_extractors.py devscripts/lazy_load_template.py $(_EXTRACTOR_FILES)
95 $(PYTHON) devscripts/make_lazy_extractors.py $@
97 youtube-dl.tar.gz: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion youtube-dl.zsh youtube-dl.fish ChangeLog
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 ChangeLog 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 \