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 *.mp4 *.flv *.mp3 *.avi CONTRIBUTING.md.tmp youtube-dl youtube-dl.exe
5 find . -name "*.pyc" -delete
8 BINDIR ?= $(PREFIX)/bin
9 MANDIR ?= $(PREFIX)/man
10 SHAREDIR ?= $(PREFIX)/share
11 PYTHON ?= /usr/bin/env python
13 # set SYSCONFDIR to /etc if PREFIX=/usr or PREFIX=/usr/local
17 ifeq ($(PREFIX),/usr/local)
20 SYSCONFDIR=$(PREFIX)/etc
24 install: youtube-dl youtube-dl.1 youtube-dl.bash-completion youtube-dl.zsh youtube-dl.fish
25 install -d $(DESTDIR)$(BINDIR)
26 install -m 755 youtube-dl $(DESTDIR)$(BINDIR)
27 install -d $(DESTDIR)$(MANDIR)/man1
28 install -m 644 youtube-dl.1 $(DESTDIR)$(MANDIR)/man1
29 install -d $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
30 install -m 644 youtube-dl.bash-completion $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/youtube-dl
31 install -d $(DESTDIR)$(SHAREDIR)/zsh/site-functions
32 install -m 644 youtube-dl.zsh $(DESTDIR)$(SHAREDIR)/zsh/site-functions/_youtube-dl
33 install -d $(DESTDIR)$(SYSCONFDIR)/fish/completions
34 install -m 644 youtube-dl.fish $(DESTDIR)$(SYSCONFDIR)/fish/completions/youtube-dl.fish
40 #nosetests --with-coverage --cover-package=youtube_dl --cover-html --verbose --processes 4 test
41 nosetests --verbose test
47 nosetests --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
49 tar: youtube-dl.tar.gz
51 .PHONY: all clean install test tar bash-completion pypi-files zsh-completion fish-completion ot offlinetest codetest supportedsites
53 pypi-files: youtube-dl.bash-completion README.txt youtube-dl.1 youtube-dl.fish
55 youtube-dl: youtube_dl/*.py youtube_dl/*/*.py
56 zip --quiet youtube-dl youtube_dl/*.py youtube_dl/*/*.py
57 zip --quiet --junk-paths youtube-dl youtube_dl/__main__.py
58 echo '#!$(PYTHON)' > youtube-dl
59 cat youtube-dl.zip >> youtube-dl
63 README.md: youtube_dl/*.py youtube_dl/*/*.py
64 COLUMNS=80 python youtube_dl/__main__.py --help | python devscripts/make_readme.py
66 CONTRIBUTING.md: README.md
67 python devscripts/make_contributing.py README.md CONTRIBUTING.md
70 python devscripts/make_supportedsites.py docs/supportedsites.md
73 pandoc -f markdown -t plain README.md -o README.txt
75 youtube-dl.1: README.md
76 python devscripts/prepare_manpage.py >youtube-dl.1.temp.md
77 pandoc -s -f markdown -t man youtube-dl.1.temp.md -o youtube-dl.1
78 rm -f youtube-dl.1.temp.md
80 youtube-dl.bash-completion: youtube_dl/*.py youtube_dl/*/*.py devscripts/bash-completion.in
81 python devscripts/bash-completion.py
83 bash-completion: youtube-dl.bash-completion
85 youtube-dl.zsh: youtube_dl/*.py youtube_dl/*/*.py devscripts/zsh-completion.in
86 python devscripts/zsh-completion.py
88 zsh-completion: youtube-dl.zsh
90 youtube-dl.fish: youtube_dl/*.py youtube_dl/*/*.py devscripts/fish-completion.in
91 python devscripts/fish-completion.py
93 fish-completion: youtube-dl.fish
95 youtube-dl.tar.gz: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion youtube-dl.zsh youtube-dl.fish
96 @tar -czf youtube-dl.tar.gz --transform "s|^|youtube-dl/|" --owner 0 --group 0 \
97 --exclude '*.DS_Store' \
98 --exclude '*.kate-swp' \
102 --exclude '__pycache' \
104 --exclude 'testdata' \
105 --exclude 'docs/_build' \
107 bin devscripts test youtube_dl docs \
108 LICENSE README.md README.txt \
109 Makefile MANIFEST.in youtube-dl.1 youtube-dl.bash-completion \
110 youtube-dl.zsh youtube-dl.fish setup.py \