forked from pycontribs/ansi2html
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (34 loc) · 1011 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright (C) 2013 Sebastian Pipping <sebastian@pipping.org>
# Licensed under LGPL v3 or later
DESTDIR = /
SETUP_PY = ./setup.py
A2X = a2x
PYTHON = python
RM = rm
GENERATED_FILES = man/ansi2html.1
_MANUAL_PACKAGE = ansi2html
_MANUAL_TITLE = ansi2html Manual
_MANUAL_VERSION = $(shell $(PYTHON) setup.py --version)
all: $(GENERATED_FILES)
$(SETUP_PY) build
check: $(GENERATED_FILES)
$(SETUP_PY) check
$(SETUP_PY) test
clean:
$(SETUP_PY) clean
$(RM) -f $(GENERATED_FILES)
dist: $(GENERATED_FILES)
$(SETUP_PY) sdist
upload: $(GENERATED_FILES)
$(SETUP_PY) sdist upload --sign
install: $(GENERATED_FILES)
$(SETUP_PY) install --root '$(DESTDIR)'
man/ansi2html.1: man/ansi2html.1.txt man/asciidoc.conf Makefile setup.py
$(A2X) \
--conf-file=man/asciidoc.conf \
--attribute="manual_package=$(_MANUAL_PACKAGE)" \
--attribute="manual_title=$(_MANUAL_TITLE)" \
--attribute="manual_version=$(_MANUAL_VERSION)" \
--format=manpage -D man \
"$<"
.PHONY: all check clean dist install upload