chiark / gitweb /
New manpage installer.
authormdw <mdw>
Wed, 23 Apr 2003 12:52:34 +0000 (12:52 +0000)
committermdw <mdw>
Wed, 23 Apr 2003 12:52:34 +0000 (12:52 +0000)
.links
Makefile.am
configure.in
man/.cvsignore
man/Makefile.am [moved from man/Makefile.m4 with 57% similarity]
man/mksofiles [deleted file]
setup

diff --git a/.links b/.links
index 18faec4e8d78d579d9ea0ffd8b935940454508fe..f2a69071b4063f8d8be35d1a51afe33eacf3b5d5 100644 (file)
--- a/.links
+++ b/.links
@@ -1,7 +1,8 @@
 COPYING.LIB
 install-sh
+lib-config.in
+maninst
 mdwopt.c
 mdwopt.h
 missing
 mkinstalldirs
-lib-config.in
index 0fbd7998b2a59cd8422d61ac3979df15a73341d3..d1ff5ad9c9b2b1349f6c606e733d472907177137 100644 (file)
@@ -1,6 +1,6 @@
 ## -*-Makefile-*-
 ##
-## $Id: Makefile.am,v 1.33 2002/01/13 13:26:59 mdw Exp $
+## $Id: Makefile.am,v 1.34 2003/04/23 12:51:03 mdw Exp $
 ##
 ## Building the distribution
 ##
@@ -29,6 +29,9 @@
 ##----- Revision history ----------------------------------------------------
 ##
 ## $Log: Makefile.am,v $
+## Revision 1.34  2003/04/23 12:51:03  mdw
+## New manpage installer.
+##
 ## Revision 1.33  2002/01/13 13:26:59  mdw
 ## New hex encoding stuff.  Rename test programs.
 ##
@@ -234,6 +237,8 @@ bres.lo: $(srcdir)/bres.c
 
 install-man:
        (cd man && $(MAKE) install-man)
+uninstall-man:
+       (cd man && $(MAKE) uninstall-man)
 
 CLEANFILES = $(TEST_CLEAN) crc32-tab.c
 DISTCLEANFILES = libtool
index b49f4945442c94d779ca5c109a7cb77b227722bb..16cc5aa8853bd892e9c73fcf63bf967d7e4ac054 100644 (file)
@@ -1,6 +1,6 @@
 dnl -*-fundamental-*-
 dnl
-dnl $Id: configure.in,v 1.29 2001/06/22 19:34:07 mdw Exp $
+dnl $Id: configure.in,v 1.30 2003/04/23 12:50:30 mdw Exp $
 dnl
 dnl Configuration script for mLib
 dnl
@@ -29,6 +29,9 @@ dnl MA 02111-1307, USA.
 dnl ----- Revision history --------------------------------------------------
 dnl
 dnl $Log: configure.in,v $
+dnl Revision 1.30  2003/04/23 12:50:30  mdw
+dnl New manpage installer.
+dnl
 dnl Revision 1.29  2001/06/22 19:34:07  mdw
 dnl Find out whether @<float.h>@ exists (hack for uC-Linux).
 dnl
@@ -84,6 +87,7 @@ mdw_INIT_LIB(mLib, mLib, 2.0.0pre4)
 AC_PROG_CC
 AM_PROG_LIBTOOL
 mdw_GCC_FLAGS
+mdw_MANEXT
 
 AC_CHECK_HEADERS(float.h)
 
index ecb54f9935a7ca79f9f25878258a5e544dc141a1..70845e08eb0b807b1022dc47cd27e67f726d4a0f 100644 (file)
@@ -1,272 +1 @@
-ASSOC_ATOM.3
-ATOM_GLOBAL.3
-ATOM_HASH.3
-ATOM_LEN.3
-ATOM_NAME.3
-A_ALLOC.3
-A_FREE.3
-A_REALLOC.3
-CATCH.3
-CREATE.3
-DA.3
-DAEXC_OFLOW.3
-DAEXC_UFLOW.3
-DA_CREATE.3
-DA_DECL.3
-DA_DESTROY.3
-DA_ENSURE.3
-DA_EXTEND.3
-DA_INCLUDE.3
-DA_INIT.3
-DA_LEN.3
-DA_OFFSET.3
-DA_POP.3
-DA_PUSH.3
-DA_RESET.3
-DA_SHIFT.3
-DA_SHRINK.3
-DA_SHUNT.3
-DA_SLIDE.3
-DA_SPARE.3
-DA_TIDY.3
-DA_UNSAFE_EXTEND.3
-DA_UNSAFE_SHRINK.3
-DA_UNSAFE_SLIDE.3
-DA_UNSAFE_UNSLIDE.3
-DA_UNSHIFT.3
-DA_UNSLIDE.3
-DCREATE.3
-DDESTROY.3
-DENSURE.3
-DESTROY.3
-DPUTC.3
-DPUTD.3
-DPUTM.3
-DPUTS.3
-DPUTZ.3
-DRESET.3
-DSGET.3
-DSPUT.3
-DSTR_INIT.3
-DWRITE.3
-END_TRY.3
-EXC_ALLOC.3
-EXC_ALLOCI.3
-EXC_ALLOCN.3
-EXC_ALLOCP.3
-EXC_ALLOCS.3
-EXC_PAIR.3
-GENSYM.3
-GETBYTE.3
-HASH_BIN.3
-HASH_MKITER.3
-HASH_NEXT.3
-INTERN.3
-LOAD16.3
-LOAD16_B.3
-LOAD16_L.3
-LOAD32.3
-LOAD32_B.3
-LOAD32_L.3
-LOAD8.3
-LSL16.3
-LSL32.3
-LSL8.3
-LSR16.3
-LSR32.3
-LSR8.3
-Makefile.am
 Makefile.in
-NTRACE.3
-POOL_ADD.3
-PUTBYTE.3
-QUIS.3
-RETHROW.3
-ROL16.3
-ROL32.3
-ROL8.3
-ROR16.3
-ROR32.3
-ROR8.3
-STORE16.3
-STORE16_B.3
-STORE16_L.3
-STORE32.3
-STORE32_B.3
-STORE32_L.3
-STORE8.3
-SYM_HASH.3
-SYM_LEN.3
-SYM_NAME.3
-T.3
-THROW.3
-TRY.3
-TV_ADD.3
-TV_ADDL.3
-TV_CMP.3
-TV_SUB.3
-TV_SUBL.3
-U16.3
-U32.3
-U8.3
-a_alloc.3
-a_free.3
-a_realloc.3
-arena_fakemalloc.3
-arena_global.3
-arena_stdlib.3
-assoc_create.3
-assoc_destroy.3
-assoc_find.3
-assoc_mkiter.3
-assoc_next.3
-assoc_remove.3
-atom_createtable.3
-atom_destroytable.3
-atom_gensym.3
-atom_hash.3
-atom_intern.3
-atom_len.3
-atom_mkiter.3
-atom_name.3
-atom_next.3
-atom_nintern.3
-base64_decode.3
-base64_encode.3
-base64_init.3
-bres_abort.3
-bres_byaddr.3
-bres_byname.3
-bres_exec.3
-bres_init.3
-conn_init.3
-conn_kill.3
-da_ensure.3
-da_shunt.3
-da_tidy.3
-die.3
-dspool_create.3
-dspool_destroy.3
-dspool_get.3
-dspool_put.3
-dstr_create.3
-dstr_destroy.3
-dstr_ensure.3
-dstr_putc.3
-dstr_putd.3
-dstr_putf.3
-dstr_putline.3
-dstr_putm.3
-dstr_puts.3
-dstr_putz.3
-dstr_reset.3
-dstr_tidy.3
-dstr_write.3
-ego.3
-env_destroy.3
-env_export.3
-env_get.3
-env_import.3
-env_put.3
-exc_uncaught.3
-fwatch_init.3
-fwatch_initfd.3
-fwatch_update.3
-fwatch_updatefd.3
-hash_bin.3
-hash_create.3
-hash_destroy.3
-hash_extend.3
-hash_mkiter.3
-hash_next.3
-hash_remove.3
-ident_abort.3
-ident_socket.3
-lbuf_close.3
-lbuf_destroy.3
-lbuf_flush.3
-lbuf_free.3
-lbuf_init.3
-lbuf_setsize.3
-lbuf_snarf.3
-links
-lock_file.3
-moan.3
-pkbuf_close.3
-pkbuf_destroy.3
-pkbuf_flush.3
-pkbuf_free.3
-pkbuf_init.3
-pkbuf_snarf.3
-pkbuf_want.3
-pool_add.3
-pool_alloc.3
-pool_create.3
-pool_destroy.3
-pool_fclose.3
-pool_fopen.3
-pool_strdup.3
-pool_sub.3
-pool_subarena.3
-pquis.3
-sel_addfile.3
-sel_addhook.3
-sel_addtimer.3
-sel_fdmerge.3
-sel_init.3
-sel_initfile.3
-sel_rmfile.3
-sel_rmhook.3
-sel_rmtimer.3
-sel_select.3
-selbuf_destroy.3
-selbuf_disable.3
-selbuf_enable.3
-selbuf_init.3
-selbuf_setsize.3
-selpk_destroy.3
-selpk_disable.3
-selpk_enable.3
-selpk_init.3
-selpk_want.3
-sig_add.3
-sig_init.3
-sig_remove.3
-stamp-so.in
-str_getword.3
-str_match.3
-str_qsplit.3
-str_qword.3
-str_sanitize.3
-str_split.3
-sub_alloc.3
-sub_free.3
-sub_init.3
-sym_create.3
-sym_destroy.3
-sym_find.3
-sym_mkiter.3
-sym_next.3
-sym_remove.3
-test_run.3
-toplevel
-trace_block.3
-trace_custom.3
-trace_level.3
-trace_on.3
-traceopt.3
-tracing.3
-tv_add.3
-tv_addl.3
-tv_cmp.3
-tv_sub.3
-tv_subl.3
-url_dec.3
-url_enc.3
-url_initdec.3
-url_initenc.3
-xmalloc.3
-xrealloc.3
-xstrdup.3
-DA_FIRST.3
-DA_LAST.3
similarity index 57%
rename from man/Makefile.m4
rename to man/Makefile.am
index 09d6f7f9b7d7c879ccc31f74843b358f46086dd6..7006695715f6a62977162a09eacb67c1be278a54 100644 (file)
@@ -1,6 +1,6 @@
 ## -*-makefile-*-
 ##
-## $Id: Makefile.m4,v 1.2 1999/07/06 19:36:05 mdw Exp $
+## $Id: Makefile.am,v 1.1 2003/04/23 12:48:19 mdw Exp $
 ##
 ## Makefile for mLib's manual pages
 ##
 
 ##----- Revision history ----------------------------------------------------
 ##
-## $Log: Makefile.m4,v $
+## $Log: Makefile.am,v $
+## Revision 1.1  2003/04/23 12:48:19  mdw
+## New manpage installer.
+##
 ## Revision 1.2  1999/07/06 19:36:05  mdw
 ## Various minor bugfixes.
 ##
 ## Makefile for manual page installation.  Subtle and complicated.
 ##
 
-AUTOMAKE_OPTIONS = foreign no-installman
-
-dnl --- Read in the various lists of things ---
+AUTOMAKE_OPTIONS = foreign
 
-define(`nl', `
-')
-define(`joinlines', `patsubst(patsubst(`$1', nl$, `'), nl, `$2')')
-define(`filenonl', `\nl        $2`'joinlines(include(`$1'), ` \\'nl`   $2')')
-define(`TOPLEVEL', filenonl(`toplevel'))
-define(`LINKS', filenonl(`links'))
-define(`SRC_TOPLEVEL', filenonl(`toplevel', `$(srcdir)/'))
-define(`SRC_LINKS', filenonl(`links', `$(srcdir)/'))
+manext = @manext@
 
 ## --- Manual pages ---
 
-man_MANS = TOPLEVEL LINKS
-
-EXTRA_DIST = Makefile.m4 $(man_MANS) mksofiles links toplevel stamp-so.in
-
-## --- Various maintenance rules ---
+MANPAGES = \
+       alloc.3 arena.3 assoc.3 atom.3 base64.3 bits.3 bres.3 conn.3 \
+       crc32.3 darray.3 dspool.3 dstr.3 env.3 exc.3 fdflags.3 fwatch.3 \
+       hash.3 ident.3 lbuf.3 lock.3 mLib.3 mdwopt.3 pkbuf.3 pool.3 \
+       quis.3 report.3 sel.3 selbuf.3 selpk.3 sig.3 str.3 sub.3 sym.3 \
+       testrig.3 trace.3 tv.3 url.3
 
-MAINTAINERCLEANFILES = SRC_LINKS $(srcdir)/Makefile.am $(srcdir)/stamp-so.in
+install-man: $(MANPAGES)
+       @$(NORMAL_INSTALL)
+       $(mkinstalldirs) $(DESTDIR)$(mandir)
+       $(top_srcdir)/maninst \
+               -d $(DESTDIR)$(mandir) -s $(srcdir) \
+               -i "$(INSTALL)" -e $(manext) \
+               install $(MANPAGES)
 
-$(srcdir)/links $(srcdir)/toplevel: stamp-so.in
+uninstall-man: $(MANPAGS)
+       @$(NORMAL_UNINSTALL)
+       $(top_srcdir)/maninst \
+               -d $(DESTDIR)$(mandir) -s $(srcdir) -e $(manext) \
+               uninstall $(MANPAGES)
 
-$(srcdir)/stamp-so.in: TOPLEVEL
-       cd $(srcdir); ./mksofiles *.[1-9]
-       touch $(srcdir)/stamp-so.in
+install-data-local: install-man
+uninstall-local: uninstall-man
 
-$(srcdir)/Makefile.am: \
-       $(srcdir)/Makefile.m4 $(srcdir)/links $(srcdir)/toplevel
-       cd $(srcdir); m4 Makefile.m4 >Makefile.am
+EXTRA_DIST = Makefile.m4 $(MANPAGES) maninst
 
 ##----- That's all, folks ---------------------------------------------------
diff --git a/man/mksofiles b/man/mksofiles
deleted file mode 100755 (executable)
index f5b28e8..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#! /bin/sh
-# -*-perl-*-
-
-exec perl -x $0 "$@";
-  
-#! perl
-
-# --- The idea ---
-#
-# Each manual page contains lines of the form
-#
-#   .\" @function
-#
-# for each function and macro documented in it.  This program sifts through
-# all of the `toplevel' manual pages and creates little manpages which
-# include the main text for each of the functions.
-#
-# The file `links' contains a generated list of little link manpages.  This
-# list is used for tidying (on a `make clean'), installing (for `make
-# install') and for pruning out old links when they're not needed any more.
-
-%top = ();
-%so = ();
-if (open SO, "links") { while (<SO>) { chomp; $so{$_} = -1; } }
-if (open TOP, "toplevel") { while (<TOP>) { chomp; $top{$_} = -1; } }
-
-foreach $f (@ARGV) {
-  ($ext = $f) =~ s/^[^.]*\.//;
-  next unless $ext =~ /^\d/;
-  $sec = $&;
-  open FILE, $f or die "open($f): $!";
-  $top = 0;
-  while (<FILE>) {
-    chomp;
-    next unless /^\.\\\"\s+\@/;
-    $top = 1;
-    $link = $';
-    $full = "$link.$ext";
-    next if $full eq $f;
-    open OUT, ">$full" or die "open(>$full): $!";
-    print OUT ".so man$sec/$f\n";
-    close OUT;
-    $so{$full}++;
-  }
-  $top{$f}++ if $top;
-  close FILE;
-}
-
-$write = 0;
-foreach $i (keys(%so)) {
-  next if $so{$i} == 0;
-  unlink $i if $so{$i} < 0;
-  $write = 1;
-}
-if ($write) {
-  open LINKS, ">links" or die "open(>links): $!";
-  foreach $i (sort(keys(%so))) {
-    print LINKS "$i\n" if $so{$i} >= 0;
-  }
-  close LINKS;
-}
-
-$write = 0;
-foreach $i (keys(%top)) {
-  $write = 1 unless $top{$i} == 0;
-}
-if ($write) {
-  open TOP, ">toplevel" or die "open(>toplevel): $!";
-  foreach $i (sort(keys(%top))) {
-    print TOP "$i\n" if $top{$i} >= 0;
-  }
-  close TOP;
-}
diff --git a/setup b/setup
index 4b49c41a66f235e6c51d6cbf9d8d4ccb54c6e8e5..5d05592d73ec6241742fd27c89d3ba20e75bfcf8 100755 (executable)
--- a/setup
+++ b/setup
@@ -4,7 +4,6 @@ set -e
 mklinks
 mkaclocal
 libtoolize
-(cd man && ./mksofiles * && m4 Makefile.m4 >Makefile.am)
 autoconf
 automake
 mkdir build