Staging
v0.5.1
https://foss.heptapod.net/mercurial/hgview
Revision d1bc043049d1d1d25318af8da47c7bd8278bdf12 authored by David Douard on 04 June 2012, 15:05:03 UTC, committed by David Douard on 04 June 2012, 15:05:03 UTC
2 parent s c7535b0 + 82c2136
Raw File
Tip revision: d1bc043049d1d1d25318af8da47c7bd8278bdf12 authored by David Douard on 04 June 2012, 15:05:03 UTC
merge stable in default
Tip revision: d1bc043
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)
back to top