Staging
v0.5.1
v0.5.1
https://foss.heptapod.net/mercurial/hgview
Revision 5e956b52bbf80ae9ec3bff38e79e8ca2e52122ad authored by David Douard on 04 December 2009, 22:20:37 UTC, committed by David Douard on 04 December 2009, 22:20:37 UTC
1 parent 0d35d4a
Tip revision: 5e956b52bbf80ae9ec3bff38e79e8ca2e52122ad authored by David Douard on 04 December 2009, 22:20:37 UTC
small fix
small fix
Tip revision: 5e956b5
Makefile
SOURCES=$(wildcard *.[0-9].txt)
MAN=$(SOURCES:%.txt=%)
HTML=$(SOURCES:%.txt=%.html)
PREFIX=/usr/local
MANDIR=$(PREFIX)/man
INSTALL=install -c
all: man html
man: $(MAN)
html: $(HTML)
%: %.xml
xmlto man $*.xml
%.xml: %.txt
asciidoc -d manpage -b docbook $*.txt
%.html: %.txt
asciidoc -b html4 $*.txt || asciidoc -b html $*.txt
install: man
for i in $(MAN) ; do \
subdir=`echo $$i | sed -n 's/..*\.\([0-9]\)$$/man\1/p'` ; \
mkdir -p $(MANDIR)/$$subdir ; \
$(INSTALL) $$i $(MANDIR)/$$subdir ; \
done
clean:
$(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html)
Computing file changes ...