1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-12-11 20:34:18 +01:00
svtplay-dl/Makefile

72 lines
1.5 KiB
Makefile
Raw Permalink Normal View History

2013-03-23 15:43:05 +01:00
all: svtplay-dl
.PHONY: test cover doctest pylint svtplay-dl \
release clean_releasedir $(RELEASE_DIR)
2013-04-21 10:48:20 +02:00
# These variables describe the latest release:
2018-03-11 23:40:02 +01:00
VERSION = 1.9.11
2016-03-28 21:32:16 +02:00
LATEST_RELEASE = $(VERSION)
# Compress the manual if MAN_GZIP is set to y,
ifeq ($(MAN_GZIP),y)
MANFILE_EXT = .gz
endif
MANFILE = svtplay-dl.1$(MANFILE_EXT)
# As pod2man is a perl tool, we have to jump through some hoops
# to remove references to perl.. :-)
POD2MAN ?= pod2man --section 1 --utf8 \
--center "svtplay-dl manual" \
--release "svtplay-dl $(VERSION)" \
--date "$(LATEST_RELEASE_DATE)"
2018-07-16 21:24:31 +02:00
PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin
2018-05-20 23:23:16 +02:00
PYTHON ?= /usr/bin/env python3
export PYTHONPATH=lib
2013-03-23 15:43:05 +01:00
# If you don't have a python3 environment (e.g. mock for py3 and
# nosetests3), you can remove the -3 flag.
TEST_OPTS ?= -2 -3
svtplay-dl: $(PYFILES)
$(MAKE) -C lib
mv -f lib/svtplay-dl .
svtplay-dl.1: svtplay-dl.pod
rm -f $@
$(POD2MAN) $< $@
svtplay-dl.1.gz: svtplay-dl.1
rm -f $@
gzip -9 svtplay-dl.1
2013-03-23 17:07:36 +01:00
test:
2015-10-25 16:04:07 +01:00
sh scripts/run-tests.sh $(TEST_OPTS)
2018-07-16 21:24:31 +02:00
install: svtplay-dl
install -d $(DESTDIR)$(BINDIR)
install -m 755 svtplay-dl $(DESTDIR)$(BINDIR)
2013-04-21 10:48:20 +02:00
cover:
2015-10-25 16:04:07 +01:00
sh scripts/run-tests.sh -C
2013-04-21 10:48:20 +02:00
pylint:
2014-12-26 02:11:19 +01:00
$(MAKE) -C lib pylint
doctest: svtplay-dl
sh scripts/diff_man_help.sh
2018-05-22 22:18:56 +02:00
release:
git tag -m "New version $(NEW_RELEASE)" \
-m "$$(git log --oneline $$(git describe --tags --abbrev=0 HEAD^)..HEAD^)" \
$(NEW_RELEASE)
clean:
$(MAKE) -C lib clean
rm -f svtplay-dl
rm -f $(MANFILE)
rm -rf .tox