|
i |
Man2html is an AutoOpts "Hello, world!" example that does something. It is yet another program to convert man page display text into html code. See the usage text or its own man page for more details. It is being released in conjunction with AutoGen for several reasons:
The "local only build" usage is actually very simple. Here is the full Makefile for this project:
CVSSRC = Makefile man2html.c opts.def README
SRC = opts.c man2html.c
OBJ = $(SRC:.c=.o)
DOCS = man2html.1 man2html.html
CFLAGS = -g `autoopts-config cflags`
LDFLAGS = `autoopts-config libs`
default : man2html
all : man2html $(DOCS)
opts.h : opts.c
opts.c : opts.def
autogen opts.def
$(OBJ) : opts.h
man2html : man2html.o opts.o
$(CC) -o $@ man2html.o opts.o $(LDFLAGS)
clobber :
rm -rf $(OBJ) opts.? man2html *~ $(DOCS) man2html-*
man2html.1 : opts.def
autogen -T agman1.tpl -b man2html opts.def
man2html.html : man2html.1 man2html
nroff -man man2html.1 | ./man2html -u > $@
dist :
ver=`sed -n 's/^version *=//p' opts.def` ; \
ver=`eval echo $$ver` ; \
rm -rf man2html-$$ver ; mkdir man2html-$$ver ; \
cp $(CVSSRC) man2html-$$ver/. ; \
tar cvf - man2html-$$ver | gzip --best > man2html-$$ver.tar.gz ; \
rm -rf man2html-$$ver
man2html Man Page ConverterHere is the AutoGen-erated usage text: /bin/bash: line 61: man2html: command not found Man Page for man2htmlHere is its own generated man page: NAME |