-.SUFFIXES: .html .xml .sgml .1.txt .3.txt .7.txt .1 .3 .7 .md5 .tar.gz
+.SUFFIXES: .html .xml .sgml .1 .3 .7 .md5 .tar.gz .1.html .3.html .7.html .1.txt .3.txt .7.txt
BINDIR = $(PREFIX)/bin
INCLUDEDIR = $(PREFIX)/include
INSTALL_LIB = install -m 0644
INSTALL_MAN = $(INSTALL_DATA)
-VERSION = 1.9.1
-VDATE = 21 August 2009
+VERSION = 1.9.5
+VDATE = 21 September 2009
VFLAGS = -DVERSION=\"$(VERSION)\"
CFLAGS += -W -Wall -Wstrict-prototypes -Wno-unused-parameter -g
MANSRCS = man_macro.c man.c man_hash.c man_validate.c \
man_action.c mandoc.c man_argv.c
-MAINLNS = main.ln mdoc_term.ln ascii.ln term.ln tree.ln \
- compat.ln man_term.ln
-MAINOBJS = main.o mdoc_term.o ascii.o term.o tree.o compat.o \
- man_term.o
-MAINSRCS = main.c mdoc_term.c ascii.c term.c tree.c compat.c \
- man_term.c
+MAINLNS = main.ln mdoc_term.ln chars.ln term.ln tree.ln \
+ compat.ln man_term.ln html.ln mdoc_html.ln \
+ man_html.ln
+MAINOBJS = main.o mdoc_term.o chars.o term.o tree.o compat.o \
+ man_term.o html.o mdoc_html.o man_html.o
+MAINSRCS = main.c mdoc_term.c chars.c term.c tree.c compat.c \
+ man_term.c html.c mdoc_html.c man_html.c
LLNS = llib-llibmdoc.ln llib-llibman.ln llib-lmandoc.ln
LNS = $(MAINLNS) $(MDOCLNS) $(MANLNS)
LIBS = libmdoc.a libman.a
OBJS = $(MDOCOBJS) $(MAINOBJS) $(MANOBJS)
SRCS = $(MDOCSRCS) $(MAINSRCS) $(MANSRCS)
-DATAS = arch.in att.in lib.in msec.in st.in vol.in ascii.in
-HEADS = mdoc.h libmdoc.h man.h libman.h term.h libmandoc.h
+DATAS = arch.in att.in lib.in msec.in st.in \
+ vol.in chars.in
+HEADS = mdoc.h libmdoc.h man.h libman.h term.h \
+ libmandoc.h html.h chars.h
SGMLS = index.sgml
XSLS = ChangeLog.xsl
-HTMLS = index.html ChangeLog.html
+HTMLS = index.html ChangeLog.html mandoc.1.html mdoc.3.html \
+ man.3.html mdoc.7.html man.7.html mandoc_char.7.html \
+ manuals.7.html
+TEXTS = mandoc.1.txt mdoc.3.txt man.3.txt mdoc.7.txt man.7.txt \
+ mandoc_char.7.txt manuals.7.html
+EXAMPLES = example.style.css
XMLS = ChangeLog.xml
-STATICS = style.css external.png
+STATICS = index.css style.css external.png
MD5S = mdocml-$(VERSION).md5
TARGZS = mdocml-$(VERSION).tar.gz
MANS = mandoc.1 mdoc.3 mdoc.7 manuals.7 mandoc_char.7 \
man.7 man.3
-TEXTS = mandoc.1.txt mdoc.3.txt mdoc.7.txt manuals.7.txt \
- mandoc_char.7.txt man.7.txt man.3.txt
BINS = mandoc
CLEAN = $(BINS) $(LNS) $(LLNS) $(LIBS) $(OBJS) $(HTMLS) \
- $(TARGZS) tags $(TEXTS) $(MD5S) $(XMLS)
+ $(TARGZS) tags $(MD5S) $(XMLS) $(TEXTS)
INSTALL = $(SRCS) $(HEADS) Makefile $(MANS) $(SGMLS) $(STATICS) \
- $(DATAS) $(XSLS)
+ $(DATAS) $(XSLS) $(EXAMPLES)
all: $(BINS)
dist: mdocml-$(VERSION).tar.gz
-html: $(HTMLS)
-
-www: all $(HTMLS) $(MD5S) $(TARGZS) $(TEXTS)
+www: all $(HTMLS) $(TEXTS) $(MD5S) $(TARGZS)
installwww: www
- install -m 0444 $(TEXTS) $(HTMLS) $(STATICS) $(PREFIX)/
+ install -m 0444 $(HTMLS) $(TEXTS) $(STATICS) $(PREFIX)/
install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/
install -m 0444 mdocml-$(VERSION).md5 $(PREFIX)/snapshots/
install -m 0444 mdocml-$(VERSION).tar.gz $(PREFIX)/snapshots/mdocml.tar.gz
vol.ln: vol.c vol.in libmdoc.h
vol.o: vol.c vol.in libmdoc.h
-ascii.ln: ascii.c ascii.in term.h
-ascii.o: ascii.c ascii.in term.h
+chars.ln: chars.c chars.in chars.h
+chars.o: chars.c chars.in chars.h
msec.ln: msec.c msec.in libmdoc.h
msec.o: msec.c msec.in libmdoc.h
compat.ln: compat.c
compat.o: compat.c
-term.ln: term.c term.h man.h mdoc.h
-term.o: term.c term.h man.h mdoc.h
+term.ln: term.c term.h man.h mdoc.h chars.h
+term.o: term.c term.h man.h mdoc.h chars.h
+
+html.ln: html.c html.h chars.h
+html.o: html.c html.h chars.h
+
+mdoc_html.ln: mdoc_html.c html.h mdoc.h
+mdoc_html.o: mdoc_html.c html.h mdoc.h
+
+man_html.ln: man_html.c html.h man.h
+man_html.o: man_html.c html.h man.h
+
+tree.ln: tree.c man.h mdoc.h
+tree.o: tree.c man.h mdoc.h
mdoc_argv.ln: mdoc_argv.c libmdoc.h
mdoc_argv.o: mdoc_argv.c libmdoc.h
mdocml-$(VERSION).tar.gz: $(INSTALL)
mkdir -p .dist/mdocml/mdocml-$(VERSION)/
- install -m 0644 $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
+ cp -f $(INSTALL) .dist/mdocml/mdocml-$(VERSION)/
( cd .dist/mdocml/ && tar zcf ../../$@ mdocml-$(VERSION)/ )
rm -rf .dist/
.1.1.txt:
./mandoc -Wall,error -fstrict $< | col -b > $@
+.1.1.html:
+ ./mandoc -Thtml -ostyle=style.css -Wall,error -fstrict $< > $@
+
.3.3.txt:
./mandoc -Wall,error -fstrict $< | col -b > $@
+.3.3.html:
+ ./mandoc -Thtml -ostyle=style.css -Wall,error -fstrict $< > $@
+
.7.7.txt:
./mandoc -Wall,error -fstrict $< | col -b > $@
+.7.7.html:
+ ./mandoc -Thtml -ostyle=style.css -Wall,error -fstrict $< > $@
+
.tar.gz.md5:
md5 $< > $@