]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - dist.mk
ncurses 5.4
[ncurses.git] / dist.mk
diff --git a/dist.mk b/dist.mk
index 5564594972d023940d17d8df1e2099b7b5bc1380..2651e2bb1f9b7c0d7cf963a4fd01d2890a382419 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -1,4 +1,4 @@
-# $Id: dist.mk,v 1.209 2000/07/08 19:43:10 tom Exp $
+# $Id: dist.mk,v 1.402 2004/02/08 20:56:43 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -9,8 +9,8 @@ SHELL = /bin/sh
 
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 5
-NCURSES_MINOR = 1
-NCURSES_PATCH = 20000708
+NCURSES_MINOR = 4
+NCURSES_PATCH = 20040208
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
@@ -24,8 +24,10 @@ GNATHTML= `type -p gnathtml || type -p gnathtml.pl`
 # Not all man programs agree with this assumption; some use half-spacing, which
 # has the effect of lengthening the text portion of the page -- so man2html
 # would remove some text.  The man program on Redhat 6.1 appears to work with
-# man2html if we set the top/bottom margins to 6 (the default is 7).
-MAN2HTML= man2html -botm=6 -topm=6 -cgiurl '$$title.$$section$$subsection.html'
+# man2html if we set the top/bottom margins to 6 (the default is 7).  Newer
+# versions of 'man' on Linux leave no margin (and make it harder to sync with
+# pages).
+MAN2HTML= man2html -botm=0 -topm=0 -cgiurl '$$title.$$section$$subsection.html'
 
 ALL    = ANNOUNCE doc/html/announce.html doc/ncurses-intro.doc doc/hackguide.doc manhtml adahtml
 
@@ -49,8 +51,8 @@ doc/ncurses-intro.doc: doc/html/ncurses-intro.html
 doc/hackguide.doc: doc/html/hackguide.html
        $(DUMP2) doc/html/hackguide.html > $@
 
-# Note that this rule assumes the manpages were installed - it does not use
-# the copies in the build tree except to get the list of names.
+MANPROG        = tbl | nroff -man
+
 manhtml: MANIFEST
        @rm -f doc/html/man/*.html
        @mkdir -p doc/html/man
@@ -63,23 +65,41 @@ manhtml: MANIFEST
             echo "s/$${xu}/$${x}/g" >> subst.tmp ;\
           fi ;\
        done
-       @sort < subst.tmp | uniq > subst.sed
+       # change some things to make weblint happy:
+       @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" ;\
-          man $$f | tr '\255' '-' | $(MAN2HTML) | \
+          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/</\&lt;/g' \
+                       -e 's/>/\&gt;/g' \
+          >> doc/html/man/$$g ;\
+          echo '-->' >> doc/html/man/$$g ;\
+          man/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 ;\
+          >> doc/html/man/$$g ;\
        done
        @rm -f subst.sed
        @sed -e "\%./doc/html/man/%d" < MANIFEST > MANIFEST.tmp
        @find ./doc/html/man -type f -print >> MANIFEST.tmp
        @chmod u+w MANIFEST
-       @sort -u < MANIFEST.tmp > MANIFEST
+       @misc/csort -u < MANIFEST.tmp > MANIFEST
        @rm -f MANIFEST.tmp
 
 #
@@ -92,7 +112,7 @@ adahtml: MANIFEST
          (cd ./Ada95/gen ; make html) ;\
          sed -e "\%./doc/html/ada/%d" < MANIFEST > MANIFEST.tmp ;\
          find ./doc/html/ada -type f -print >> MANIFEST.tmp ;\
-         sort -u < MANIFEST.tmp > MANIFEST ;\
+         misc/csort -u < MANIFEST.tmp > MANIFEST ;\
          rm -f MANIFEST.tmp ;\
        fi
 
@@ -110,7 +130,7 @@ writelock:
 MANIFEST:
        -rm -f $@
        touch $@
-       find . -type f -print |sort | fgrep -v .lsm |fgrep -v .spec >$@
+       find . -type f -print |misc/csort | fgrep -v .lsm |fgrep -v .spec >$@
 
 TAGS:
        etags */*.[ch]