Staging
v0.5.1
Revision 93b44d3a1c6aebff248d62b5d1bea5f2ae273444 authored by Pierre-Yves David on 01 May 2014, 08:12:04 UTC, committed by Pierre-Yves David on 01 May 2014, 08:12:04 UTC
There is a fix for Mercurial 3.0 compatibility that we need out.
1 parent cd353d5
Raw File
Makefile
SOURCES=hgview.1.txt
#$(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 -o $@ $<

%.html: %.txt
	asciidoc -b html4 -o $@ $< || asciidoc -b html -o $@ $<

install: man
	for i in $(MAN) ; do \
	  subdir=`echo $$i | sed -n 's/..*\.\([0-9]\)$$/man\1/p'` ; \
	  $(INSTALL) -d $(DESTDIR)$(MANDIR)/$$subdir && \
	  $(INSTALL) $$i $(DESTDIR)$(MANDIR)/$$subdir ; \
	done

clean:
	$(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html)
back to top