]> jfr.im git - yt-dlp.git/blame - Makefile
moved make release to devscripts/release.sh
[yt-dlp.git] / Makefile
CommitLineData
dce10884 1all: youtube-dl youtube-dl.exe README.md youtube-dl.1 youtube-dl.bash-completion LATEST_VERSION
4618f3da 2
dce10884
FV
3install: youtube-dl youtube-dl.1 youtube-dl.bash-completion
4 install -m 755 --owner root --group root youtube-dl /usr/local/bin/
5 install -m 644 --owner root --group root youtube-dl.1 /usr/local/man/man1
6 install -m 644 --owner root --group root youtube-dl.bash-completion /etc/bash_completion.d/youtube-dl
7
225dceb0 8.PHONY: all install
dce10884
FV
9
10youtube-dl: youtube_dl/*.py
11 zip --quiet --junk-paths youtube-dl youtube_dl/*.py
12 echo '#!/usr/bin/env python' > youtube-dl
13 cat youtube-dl.zip >> youtube-dl
14 rm youtube-dl.zip
15
16youtube-dl.exe: youtube_dl/*.py
17 bash devscripts/wine-py2exe.sh build_exe.py
4618f3da 18
dce10884 19README.md: youtube-dl
cfcec693
FV
20 @options=$$(COLUMNS=80 ./youtube-dl --help | sed -e '1,/.*General Options.*/ d' -e 's/^\W\{2\}\(\w\)/## \1/') && \
21 header=$$(sed -e '/.*# OPTIONS/,$$ d' README.md) && \
22 footer=$$(sed -e '1,/.*# FAQ/ d' README.md) && \
4618f3da 23 echo "$${header}" > README.md && \
66e87777 24 echo >> README.md && \
cfcec693 25 echo '# OPTIONS' >> README.md && \
4618f3da 26 echo "$${options}" >> README.md&& \
66e87777 27 echo >> README.md && \
cfcec693 28 echo '# FAQ' >> README.md && \
4618f3da
PH
29 echo "$${footer}" >> README.md
30
dce10884 31youtube-dl.1: README.md
cfcec693
FV
32 pandoc -s -w man README.md -o youtube-dl.1
33
dce10884 34youtube-dl.bash-completion: README.md
ce7b2a40
FV
35 @options=`egrep -o '(--[a-z-]+) ' README.md | sort -u | xargs echo` && \
36 content=`sed "s/opts=\"[^\"]*\"/opts=\"$${options}\"/g" youtube-dl.bash-completion` && \
37 echo "$${content}" > youtube-dl.bash-completion
38
dce10884
FV
39LATEST_VERSION: youtube-dl
40 ./youtube-dl --version > LATEST_VERSION