]> jfr.im git - yt-dlp.git/blame - Makefile
little correction on the readme
[yt-dlp.git] / Makefile
CommitLineData
cc51a7d4 1all: youtube-dl README.md README.txt youtube-dl.1 youtube-dl.bash-completion
4618f3da 2
85f76ac9 3clean:
cc51a7d4 4 rm -rf youtube-dl youtube-dl.exe youtube-dl.1 youtube-dl.bash-completion README.txt MANIFEST build/ dist/
4618f3da 5
0e841bdc 6PREFIX=/usr/local
e79e8b7d
TM
7BINDIR=$(PREFIX)/bin
8MANDIR=$(PREFIX)/man
9SYSCONFDIR=/etc
10
dce10884 11install: youtube-dl youtube-dl.1 youtube-dl.bash-completion
e79e8b7d
TM
12 install -d $(DESTDIR)$(BINDIR)
13 install -m 755 youtube-dl $(DESTDIR)$(BINDIR)
14 install -d $(DESTDIR)$(MANDIR)/man1
15 install -m 644 youtube-dl.1 $(DESTDIR)$(MANDIR)/man1
16 install -d $(DESTDIR)$(SYSCONFDIR)/bash_completion.d
17 install -m 644 youtube-dl.bash-completion $(DESTDIR)$(SYSCONFDIR)/bash_completion.d/youtube-dl
dce10884 18
a7b5c8d6
FV
19test:
20 nosetests2 --nocapture test
21
cc51a7d4 22.PHONY: all clean install test
dce10884
FV
23
24youtube-dl: youtube_dl/*.py
20ba0426
FV
25 zip --quiet youtube-dl youtube_dl/*.py
26 zip --quiet --junk-paths youtube-dl youtube_dl/__main__.py
dce10884
FV
27 echo '#!/usr/bin/env python' > youtube-dl
28 cat youtube-dl.zip >> youtube-dl
29 rm youtube-dl.zip
85f76ac9 30 chmod a+x youtube-dl
dce10884 31
646b885c 32README.md: youtube_dl/*.py
4bb028f4 33 COLUMNS=80 python -m youtube_dl --help | python devscripts/make_readme.py
4618f3da 34
cc51a7d4 35README.txt: README.md
4bb028f4 36 pandoc -f markdown -t plain README.md -o README.txt
cc51a7d4 37
dce10884 38youtube-dl.1: README.md
a5741a3f 39 pandoc -s -f markdown -t man README.md -o youtube-dl.1
cfcec693 40
cc51a7d4 41youtube-dl.bash-completion: README.md youtube-dl.bash-completion.in
ce7b2a40 42 @options=`egrep -o '(--[a-z-]+) ' README.md | sort -u | xargs echo` && \
cc51a7d4 43 content=`sed "s/opts=\"[^\"]*\"/opts=\"$${options}\"/g" youtube-dl.bash-completion.in` && \
ce7b2a40 44 echo "$${content}" > youtube-dl.bash-completion
23109d6a
FV
45
46youtube-dl.tar.gz: all
47 tar -czf youtube-dl.tar.gz -s "|^./|./youtube-dl/|" \
48 --exclude="*.pyc" --exclude="*.pyo" --exclude="*~" --exclude="youtube-dl.exe" \
49 --exclude="wine-py2exe/" --exclude="py2exe.log" --exclude="*.kate-swp" \
50 --exclude="build/" --exclude="dist/" --exclude="MANIFEST" --exclude=".git/" .