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)
|