File: Makefile

package info (click to toggle)
doclifter 2.21-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,888 kB
  • sloc: python: 10,117; xml: 2,384; sh: 274; makefile: 79; lisp: 37
file content (88 lines) | stat: -rw-r--r-- 2,491 bytes parent folder | download | duplicates (2)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Makefile for the doclifter project
#
# SPDX-FileCopyrightText: Copyright Eric S. Raymond <esr@thyrsus.com>
# SPDX-License-Identifier: BSD-2-Clause

VERSION=$(shell sed <doclifter -n -e '/^version *= *"\(.*\)"/s//\1/p')

PREFIX=/usr
MANDIR=$(PREFIX)/share/man/man1
BINDIR=$(PREFIX)/bin

DOCS    = README COPYING TODO PATCHES \
		doclifter.xml doclifter.1 manlifter.xml manlifter.1
SOURCES = doclifter manlifter Makefile $(DOCS) tests/ doclifter-logo.png

all: doclifter-$(VERSION).tar.gz

install: doclifter.1
	cp doclifter $(BINDIR)
	gzip <doclifter.1 >$(MANDIR)/doclifter.1.gz
	rm doclifter.1

doclifter.1: doclifter.xml
	xmlto man doclifter.xml

manlifter.1: manlifter.xml
	xmlto man manlifter.xml

doclifter.html: doclifter.xml
	xmlto xhtml-nochunks doclifter.xml

manlifter.html: manlifter.xml
	xmlto xhtml-nochunks manlifter.xml

doclifter-$(VERSION).tar.gz: $(SOURCES)
	mkdir doclifter-$(VERSION)
	cp -r $(SOURCES) doclifter-$(VERSION)
	tar -czf doclifter-$(VERSION).tar.gz doclifter-$(VERSION)
	rm -fr doclifter-$(VERSION)
	ls -l doclifter-$(VERSION).tar.gz

doclifter-$(VERSION).md5: doclifter-$(VERSION).tar.gz
	@md5sum doclifter-$(VERSION).tar.gz >doclifter-$(VERSION).md5

# Note: This will show a spurious diff if pic2plot is not installed.
check:
	@cd tests >/dev/null; make --quiet

pylint:
	@pylint --score=n doclifter

pychecker:
	@echo "Expect 4 warnings."
	@ln -f doclifter doclifter.py
	@-pychecker --only --quiet --limit 50 doclifter.py
	@rm -f doclifter.py doclifter.pyc

reflow:
	@black doclifter manlifter buglist.py

dist: doclifter-$(VERSION).tar.gz

clean:
	rm -f doclifter.html manlifter.html doclifter.1 manlifter.1
	rm -f *.pyc docliftertest.xml foobar* fixed* *~ bugs.html
	rm -f index.html *.tar.gz *.md5 *old

htmlclean:
	rm *.html

NEWSVERSION=$(shell sed -n <NEWS '/^[0-9]/s/:.*//p' | head -1)

release: doclifter-$(VERSION).tar.gz doclifter-$(VERSION).md5 doclifter.html manlifter.html
	@[ $(VERSION) = $(NEWSVERSION) ] || { echo "Version mismatch!"; exit 1; }
	shipper version=$(VERSION) | sh -e -x

refresh: htmlclean doclifter.html manlifter.html
	@[ $(VERSION) = $(NEWSVERSION) ] || { echo "Version mismatch!"; exit 1; }
	shipper -N -w version=$(VERSION) | sh -e -x

# This is used only for updating the bugs page on my website.
# It won't work for anyone else.
REMOTE=esr@login.ibiblio.org
UPDIR=/public/html/catb/esr/doclifter
update:
	problemgen.py >bugs.html
	ssh $(REMOTE) rm -fr $(UPDIR)/prepatch
	scp -r bugs.html prepatch/ $(REMOTE):$(UPDIR)