]> jfr.im git - yt-dlp.git/blame - Makefile
auto-generating manpage from README.md (closes #151); redesigned Makefile
[yt-dlp.git] / Makefile
CommitLineData
cfcec693 1all: compile exe readme man-page update-latest
4618f3da 2
b576abb4 3update-latest:
cfcec693 4 ./youtube-dl --version > LATEST_VERSION
4618f3da 5
cfcec693
FV
6readme:
7 @options=$$(COLUMNS=80 ./youtube-dl --help | sed -e '1,/.*General Options.*/ d' -e 's/^\W\{2\}\(\w\)/## \1/') && \
8 header=$$(sed -e '/.*# OPTIONS/,$$ d' README.md) && \
9 footer=$$(sed -e '1,/.*# FAQ/ d' README.md) && \
4618f3da 10 echo "$${header}" > README.md && \
66e87777 11 echo >> README.md && \
cfcec693 12 echo '# OPTIONS' >> README.md && \
4618f3da 13 echo "$${options}" >> README.md&& \
66e87777 14 echo >> README.md && \
cfcec693 15 echo '# FAQ' >> README.md && \
4618f3da
PH
16 echo "$${footer}" >> README.md
17
cfcec693
FV
18man-page:
19 pandoc -s -w man README.md -o youtube-dl.1
20
235b3ba4 21compile:
668d9750 22 zip --quiet --junk-paths youtube-dl youtube_dl/*.py
d77c3dfd
FV
23 echo '#!/usr/bin/env python' > youtube-dl
24 cat youtube-dl.zip >> youtube-dl
25 rm youtube-dl.zip
4618f3da 26
cfcec693
FV
27exe:
28 bash devscripts/wine-py2exe.sh build_exe.py
29
30install:
ef0c08cd 31 install -m 755 --owner root --group root youtube-dl /usr/local/bin/
cfcec693 32 install -m 644 --owner root --group root youtube-dl.1 /usr/local/man/man1
ef0c08cd 33
cfcec693 34.PHONY: all update-latest readme man-page compile exe install