+# This is the original command:
+# MANPROG = tbl | nroff -man
+#
+# This happens to work for groff 1.18.1 on Debian. At some point groff's
+# maintainer changed the line-length (we do not want/need that here).
+#
+# The distributed html files are formatted using
+# configure --without-manpage-renames
+#
+# The edit_man.sed script is built as a side-effect of installing the manpages.
+# If that conflicts with the --without-manpage-renames, you can install those
+# in a different location using the --with-install-prefix option of the
+# configure script.
+MANPROG = tbl | nroff -mandoc -rLL=65n -rLT=71n -Tascii
+
+manhtml:
+ @rm -f doc/html/man/*.html
+ @mkdir -p doc/html/man
+ @rm -f subst.tmp ;
+ @for f in man/*.[0-9]*; do \
+ m=`basename $$f` ;\
+ x=`echo $$m | awk -F. '{print $$2;}'` ;\
+ xu=`echo $$x | dd conv=ucase 2>/dev/null` ;\
+ if [ "$${x}" != "$${xu}" ]; then \
+ echo "s/$${xu}/$${x}/g" >> subst.tmp ;\
+ fi ;\
+ done
+ # change some things to make weblint happy:
+ @cat man_alias.sed >> subst.tmp
+ @echo 's/<B>/<STRONG>/g' >> subst.tmp
+ @echo 's/<\/B>/<\/STRONG>/g' >> subst.tmp
+ @echo 's/<I>/<EM>/g' >> subst.tmp
+ @echo 's/<\/I>/<\/EM>/g' >> subst.tmp
+ @misc/csort < subst.tmp | uniq > subst.sed
+ @echo '/<\/TITLE>/a\' >> subst.sed
+ @echo '<link rev=made href="mailto:bug-ncurses@gnu.org">\' >> subst.sed
+ @echo '<meta http-equiv="Content-Type" content="text\/html; charset=iso-8859-1">' >> subst.sed
+ @rm -f subst.tmp
+ @for f in man/*.[0-9]* ; do \
+ m=`basename $$f` ;\
+ T=`egrep '^.TH' $$f|sed -e 's/^.TH //' -e s'/"//g' -e 's/[ ]\+$$//'` ; \
+ g=$${m}.html ;\
+ if [ -f doc/html/$$g ]; then chmod +w doc/html/$$g; fi;\
+ echo "Converting $$m to HTML" ;\
+ echo '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">' > doc/html/man/$$g ;\
+ echo '<!-- ' >> doc/html/man/$$g ;\
+ egrep '^.\\"[^#]' $$f | \
+ sed -e 's/\$$/@/g' \
+ -e 's/^.../ */' \
+ -e 's/</\</g' \
+ -e 's/>/\>/g' \
+ >> doc/html/man/$$g ;\
+ echo '-->' >> doc/html/man/$$g ;\
+ ./edit_man.sh normal editing /usr/man man $$f | $(MANPROG) | tr '\255' '-' | $(MAN2HTML) -title "$$T" | \
+ sed -f subst.sed |\
+ sed -e 's/"curses.3x.html"/"ncurses.3x.html"/g' \
+ >> doc/html/man/$$g ;\
+ done
+ @rm -f subst.sed