1 # Just a quick makefile to help keeping the whole thing coherent and
2 # up to date (documentation, internal versionning).
6 # - GNU Make (obviously!)
8 # - Git and Cogito for tagging
9 # - POSIX compliant date util (tested on GNU coreutils)
10 # - help2man, to regenerate the man page
11 # - asciidoc and htmltidy, to refresh the html doc
12 # - links, to generate the text-only README
14 DOC
=radcan
.1 README index.html
15 DATE
=$(shell env LC_ALL
=fr_FR date
+'%A, le %d %B %Y')
16 VER
=$(shell cg tag-ls | sed
'$$!d;s/\([0-9\.]*\).*/\1/')
17 OLD
=$(shell cat .version
2> /dev
/null
)
21 radcan
.1: radcan radcan.py radcan.inc
22 help2man
--include radcan.inc
--no-info .
/$< > $@
25 links
-html-numbered-links
1 -dump
$< > $@
27 index.html
: readme.txt
28 asciidoc
-a revision
="$(VER)" -a localdate
="$(DATE)" \
30 -a stylesdir
=/etc
/asciidoc
/stylesheets \
31 -f asciidoc.conf
-o
$@
$<
32 -tidy
--input-encoding utf8
--output-encoding ascii \
41 # Versionning support: call with `make VER=xxx' to force upgrade.
46 setup.py radcan.py index.html
: .version
50 sed
-i
"s/^\(__version__ = \).*/\1 '$(VER)'/" radcan.py
51 sed
-i
"s/\(version=\).*/\1'$(VER)',/" setup.py
52 @echo
$(VER
) > .version