chiark / gitweb /
Infrastructure: Split the files into subdirectories.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 3 May 2009 00:40:25 +0000 (01:40 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 20 Oct 2012 11:37:52 +0000 (12:37 +0100)
This makes the file tree rather easier to work with.

183 files changed:
.links
Makefile.am
buf/Makefile.am [new file with mode: 0644]
buf/lbuf.3 [moved from lbuf.3 with 100% similarity]
buf/lbuf.c [moved from lbuf.c with 100% similarity]
buf/lbuf.h [moved from lbuf.h with 100% similarity]
buf/pkbuf.3 [moved from pkbuf.3 with 100% similarity]
buf/pkbuf.c [moved from pkbuf.c with 100% similarity]
buf/pkbuf.h [moved from pkbuf.h with 100% similarity]
codec/Makefile.am [new file with mode: 0644]
codec/base32.3 [moved from base32.3 with 100% similarity]
codec/base32.c [moved from base32.c with 100% similarity]
codec/base32.h [moved from base32.h with 100% similarity]
codec/base32.in [moved from base32.in with 100% similarity]
codec/base32.ref [moved from base32.ref with 100% similarity]
codec/base64.3 [moved from base64.3 with 100% similarity]
codec/base64.c [moved from base64.c with 100% similarity]
codec/base64.h [moved from base64.h with 100% similarity]
codec/base64.in [moved from base64.in with 100% similarity]
codec/base64.ref [moved from base64.ref with 100% similarity]
codec/hex.3 [moved from hex.3 with 100% similarity]
codec/hex.c [moved from hex.c with 100% similarity]
codec/hex.h [moved from hex.h with 100% similarity]
codec/hex.in [moved from hex.in with 100% similarity]
codec/hex.ref [moved from hex.ref with 100% similarity]
codec/url.3 [moved from url.3 with 100% similarity]
codec/url.c [moved from url.c with 100% similarity]
codec/url.h [moved from url.h with 100% similarity]
configure.ac
hash/Makefile.am [new file with mode: 0644]
hash/crc-mktab.1 [moved from crc-mktab.1 with 100% similarity]
hash/crc-mktab.c [moved from crc-mktab.c with 100% similarity]
hash/crc32.3 [moved from crc32.3 with 100% similarity]
hash/crc32.c [moved from crc32.c with 100% similarity]
hash/crc32.h [moved from crc32.h with 100% similarity]
hash/unihash-check.pl [moved from unihash-check.pl with 100% similarity]
hash/unihash-mkstatic.1 [moved from unihash-mkstatic.1 with 100% similarity]
hash/unihash-mkstatic.c [moved from unihash-mkstatic.c with 100% similarity]
hash/unihash.3 [moved from unihash.3 with 100% similarity]
hash/unihash.c [moved from unihash.c with 100% similarity]
hash/unihash.h [moved from unihash.h with 100% similarity]
mem/Makefile.am [new file with mode: 0644]
mem/alloc.3 [moved from alloc.3 with 100% similarity]
mem/alloc.c [moved from alloc.c with 100% similarity]
mem/alloc.h [moved from alloc.h with 100% similarity]
mem/arena.3 [moved from arena.3 with 100% similarity]
mem/arena.c [moved from arena.c with 100% similarity]
mem/arena.h [moved from arena.h with 100% similarity]
mem/pool-file.c [moved from pool-file.c with 100% similarity]
mem/pool-sub.c [moved from pool-sub.c with 100% similarity]
mem/pool.3 [moved from pool.3 with 100% similarity]
mem/pool.c [moved from pool.c with 100% similarity]
mem/pool.h [moved from pool.h with 100% similarity]
mem/sub.3 [moved from sub.3 with 100% similarity]
mem/sub.c [moved from sub.c with 100% similarity]
mem/sub.h [moved from sub.h with 100% similarity]
mem/track.c [moved from track.c with 100% similarity]
mem/track.h [moved from track.h with 100% similarity]
sel/Makefile.am [new file with mode: 0644]
sel/bres-adns.c [moved from bres-adns.c with 100% similarity]
sel/bres.3 [moved from bres.3 with 100% similarity]
sel/bres.c [moved from bres.c with 100% similarity]
sel/bres.h [moved from bres.h with 100% similarity]
sel/conn.3 [moved from conn.3 with 100% similarity]
sel/conn.c [moved from conn.c with 100% similarity]
sel/conn.h [moved from conn.h with 100% similarity]
sel/ident.3 [moved from ident.3 with 100% similarity]
sel/ident.c [moved from ident.c with 100% similarity]
sel/ident.h [moved from ident.h with 100% similarity]
sel/sel.3 [moved from sel.3 with 100% similarity]
sel/sel.c [moved from sel.c with 100% similarity]
sel/sel.h [moved from sel.h with 100% similarity]
sel/selbuf.3 [moved from selbuf.3 with 100% similarity]
sel/selbuf.c [moved from selbuf.c with 100% similarity]
sel/selbuf.h [moved from selbuf.h with 100% similarity]
sel/selpk.3 [moved from selpk.3 with 100% similarity]
sel/selpk.c [moved from selpk.c with 100% similarity]
sel/selpk.h [moved from selpk.h with 100% similarity]
sel/sig.3 [moved from sig.3 with 100% similarity]
sel/sig.c [moved from sig.c with 100% similarity]
sel/sig.h [moved from sig.h with 100% similarity]
struct/Makefile.am [new file with mode: 0644]
struct/assoc-test.c [moved from assoc-test.c with 100% similarity]
struct/assoc.3 [moved from assoc.3 with 100% similarity]
struct/assoc.c [moved from assoc.c with 100% similarity]
struct/assoc.h [moved from assoc.h with 100% similarity]
struct/atom.3 [moved from atom.3 with 100% similarity]
struct/atom.c [moved from atom.c with 100% similarity]
struct/atom.h [moved from atom.h with 100% similarity]
struct/buf-dstr.c [moved from buf-dstr.c with 100% similarity]
struct/buf.3 [moved from buf.3 with 100% similarity]
struct/buf.c [moved from buf.c with 100% similarity]
struct/buf.h [moved from buf.h with 100% similarity]
struct/da-gtest [moved from da-gtest with 100% similarity]
struct/da-ref [moved from da-ref with 100% similarity]
struct/da-test.c [moved from da-test.c with 100% similarity]
struct/darray.3 [moved from darray.3 with 100% similarity]
struct/darray.c [moved from darray.c with 100% similarity]
struct/darray.h [moved from darray.h with 100% similarity]
struct/dspool.3 [moved from dspool.3 with 100% similarity]
struct/dspool.c [moved from dspool.c with 100% similarity]
struct/dspool.h [moved from dspool.h with 100% similarity]
struct/dstr-putf.c [moved from dputf.c with 100% similarity]
struct/dstr.3 [moved from dstr.3 with 100% similarity]
struct/dstr.c [moved from dstr.c with 100% similarity]
struct/dstr.h [moved from dstr.h with 100% similarity]
struct/hash.3 [moved from hash.3 with 100% similarity]
struct/hash.c [moved from hash.c with 100% similarity]
struct/hash.h [moved from hash.h with 100% similarity]
struct/sym-gtest [moved from sym-gtest with 100% similarity]
struct/sym-ref [moved from sym-ref with 100% similarity]
struct/sym-test.c [moved from sym-test.c with 100% similarity]
struct/sym.3 [moved from sym.3 with 100% similarity]
struct/sym.c [moved from sym.c with 100% similarity]
struct/sym.h [moved from sym.h with 100% similarity]
sys/Makefile.am [new file with mode: 0644]
sys/daemonize.3 [moved from daemonize.3 with 100% similarity]
sys/daemonize.c [moved from daemonize.c with 100% similarity]
sys/daemonize.h [moved from daemonize.h with 100% similarity]
sys/env.3 [moved from env.3 with 100% similarity]
sys/env.c [moved from env.c with 100% similarity]
sys/env.h [moved from env.h with 100% similarity]
sys/fdflags.3 [moved from fdflags.3 with 100% similarity]
sys/fdflags.c [moved from fdflags.c with 100% similarity]
sys/fdflags.h [moved from fdflags.h with 100% similarity]
sys/fdpass.3 [moved from fdpass.3 with 100% similarity]
sys/fdpass.c [moved from fdpass.c with 100% similarity]
sys/fdpass.h [moved from fdpass.h with 100% similarity]
sys/fwatch.3 [moved from fwatch.3 with 100% similarity]
sys/fwatch.c [moved from fwatch.c with 100% similarity]
sys/fwatch.h [moved from fwatch.h with 100% similarity]
sys/lock.3 [moved from lock.3 with 100% similarity]
sys/lock.c [moved from lock.c with 100% similarity]
sys/lock.h [moved from lock.h with 100% similarity]
sys/mdup-test.c [moved from mdup-test.c with 100% similarity]
sys/mdup-test.sh [moved from mdup-test.sh with 100% similarity]
sys/mdup.3 [moved from mdup.3 with 100% similarity]
sys/mdup.c [moved from mdup.c with 100% similarity]
sys/mdup.h [moved from mdup.h with 100% similarity]
sys/tv.3 [moved from tv.3 with 100% similarity]
sys/tv.c [moved from tv.c with 100% similarity]
sys/tv.h [moved from tv.h with 100% similarity]
test/Makefile.am [new file with mode: 0644]
test/testrig.3 [moved from testrig.3 with 100% similarity]
test/testrig.c [moved from testrig.c with 100% similarity]
test/testrig.h [moved from testrig.h with 100% similarity]
trace/Makefile.am [new file with mode: 0644]
trace/trace.3 [moved from trace.3 with 100% similarity]
trace/trace.c [moved from trace.c with 100% similarity]
trace/trace.h [moved from trace.h with 100% similarity]
trace/traceopt.c [moved from traceopt.c with 100% similarity]
ui/Makefile.am [new file with mode: 0644]
ui/mdwopt.3 [moved from mdwopt.3 with 100% similarity]
ui/pquis.c [moved from pquis.c with 100% similarity]
ui/quis.3 [moved from quis.3 with 100% similarity]
ui/quis.c [moved from quis.c with 100% similarity]
ui/quis.h [moved from quis.h with 100% similarity]
ui/report.3 [moved from report.3 with 100% similarity]
ui/report.c [moved from report.c with 100% similarity]
ui/report.h [moved from report.h with 100% similarity]
utils/Makefile.am [new file with mode: 0644]
utils/align.3 [moved from align.3 with 100% similarity]
utils/align.h [moved from align.h with 100% similarity]
utils/bits-testgen.c [moved from bits-testgen.c with 100% similarity]
utils/bits.3 [moved from bits.3 with 100% similarity]
utils/bits.c [moved from bits.c with 100% similarity]
utils/bits.h [moved from bits.h with 100% similarity]
utils/bits.in [moved from bits.in with 100% similarity]
utils/exc.3 [moved from exc.3 with 100% similarity]
utils/exc.c [moved from exc.c with 100% similarity]
utils/exc.h [moved from exc.h with 100% similarity]
utils/exctest.c [moved from exctest.c with 100% similarity]
utils/macros.3 [moved from macros.3 with 100% similarity]
utils/macros.h [moved from macros.h with 100% similarity]
utils/str.3 [moved from str.3 with 100% similarity]
utils/str.c [moved from str.c with 100% similarity]
utils/str.h [moved from str.h with 100% similarity]
utils/versioncmp-test.c [moved from versioncmp-test.c with 100% similarity]
utils/versioncmp.3 [moved from versioncmp.3 with 100% similarity]
utils/versioncmp.c [moved from versioncmp.c with 100% similarity]
utils/versioncmp.h [moved from versioncmp.h with 100% similarity]
utils/versioncmp.in [moved from versioncmp.in with 100% similarity]
vars.am [new file with mode: 0644]

diff --git a/.links b/.links
index 7277314bd434eaff30c616cfa4dcdca0e45e0a6e..f660b625957a2ea6881673640d072f573e0c3c5f 100644 (file)
--- a/.links
+++ b/.links
@@ -1,7 +1,7 @@
 config/maninst
 config/auto-version
 config/confsubst
-mdwopt.c
-mdwopt.h
+ui/mdwopt.c
+ui/mdwopt.h
 COPYING
 COPYING.LIB
index 5e7f7fdea02c8737e9032d96dd75a8ae2a83e425..66185ee23f2d754b63acc4265adac104a1cab8af 100644 (file)
@@ -1,8 +1,8 @@
-### -*-Makefile-*-
+### -*-makefile-*-
 ###
-### Building the distribution
+### Top-level build for mLib
 ###
-### (c) 1998 Straylight/Edgeware
+### (c) 2009 Straylight/Edgeware
 ###
 
 ###----- Licensing notice ---------------------------------------------------
 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 ### MA 02111-1307, USA.
 
-pkglibexecdir           = $(libexecdir)/$(PACKAGE)
+include $(top_srcdir)/vars.am
 
 SUBDIRS                         =
-BUILT_SOURCES           =
-bin_PROGRAMS            =
-check_PROGRAMS          =
-lib_LTLIBRARIES                 =
-noinst_LTLIBRARIES      =
-pkglibexec_PROGRAMS     =
-pkginclude_HEADERS      =
-EXTRA_DIST              =
-CLEANFILES              =
-DISTCLEANFILES          =
-PROGMANS                =
-LIBMANS                         =
-
-confsubst               = $(top_srcdir)/config/confsubst
-
-SUBSTITUTIONS = \
-       prefix=$(prefix) exec_prefix=$(exec_prefix) \
-       libdir=$(libdir) includedir=$(includedir) \
-       bindir=$(bindir) sbindir=$(sbindir) \
-       PACKAGE=$(PACKAGE) VERSION=$(VERSION)
 
 ###--------------------------------------------------------------------------
-### Library.
+### Top-level library.
 
-lib_LTLIBRARIES                += libmLib.la
+lib_LTLIBRARIES                 = libmLib.la
 libmLib_la_LDFLAGS      = -version-info $(LIBTOOL_VERSION_INFO)
 libmLib_la_SOURCES      =
 libmLib_la_LIBADD       =
 
+###--------------------------------------------------------------------------
+### Package-configuration file.
+
 pkgconfigdir            = $(libdir)/pkgconfig
 pkgconfig_DATA          = mLib.pc
 EXTRA_DIST             += mLib.pc.in
@@ -66,464 +49,54 @@ mLib.pc: mLib.pc.in Makefile
                mv $@.new $@
 
 ###--------------------------------------------------------------------------
-### Testing.
-
-check: tests
-.PHONY: check tests
-
-TEST_CPPFLAGS           = -DTEST_RIG -DSRCDIR="\"(srcdir)\"" $(AM_CPPFLAGS)
-
-LDADD                   = libmLib.la
-
-###--------------------------------------------------------------------------
-### Utilities.
-
-noinst_LTLIBRARIES     += libutils.la
-libutils_la_SOURCES     =
-libutils_la_LIBADD      =
-libmLib_la_LIBADD      += libutils.la
-
-## Utility macros.
-pkginclude_HEADERS     += macros.h
-LIBMANS                        += macros.3
-
-## Alignment.
-pkginclude_HEADERS     += align.h
-LIBMANS                        += align.3
-
-## Bit manipulation.
-pkginclude_HEADERS     += bits.h
-LIBMANS                        += bits.3
-
-EXTRA_DIST             += bits.in bits-testgen.c
-tests:: bits.t bits.in
-       ./bits.t -f $(srcdir)/bits.in
-
-check_PROGRAMS         += bits.t
-bits_t_SOURCES          = bits.c
-bits_t_CPPFLAGS                 = $(TEST_CPPFLAGS)
-bits_t_LDFLAGS          = -static
-
-## Exceptions.
-pkginclude_HEADERS     += exc.h
-libmLib_la_SOURCES     += exc.c
-LIBMANS                        += exc.3
-
-## String handling.
-pkginclude_HEADERS     += str.h
-libutils_la_SOURCES    += str.c
-LIBMANS                        += str.3
-
-## Version comparison.
-pkginclude_HEADERS     += versioncmp.h
-libmLib_la_SOURCES     += versioncmp.c
-LIBMANS                        += versioncmp.3
-
-EXTRA_DIST             += versioncmp.in
-tests:: versioncmp.t versioncmp.in
-       ./versioncmp.t -f $(srcdir)/versioncmp.in
-
-check_PROGRAMS         += versioncmp.t
-versioncmp_t_SOURCES    = versioncmp-test.c
-versioncmp_t_CPPFLAGS   = $(TEST_CPPFLAGS)
-versioncmp_t_LDFLAGS    = -static
+### Subdirectories.
+###
+### Note: There are implicit dependencies between the subdirectories.  Be
+### careful about reordering them.
 
-###--------------------------------------------------------------------------
-### Memory allocation.
+## Utilities.
+SUBDIRS                        += utils
+libmLib_la_LIBADD      += utils/libutils.la
 
 ## Memory allocation.
-pkginclude_HEADERS     += alloc.h arena.h sub.h
-libmLib_la_SOURCES     += alloc.c arena.c sub.c
-LIBMANS                        += alloc.3 arena.3 sub.3
-
-## Pool allocator.
-pkginclude_HEADERS     += pool.h
-libmLib_la_SOURCES     += pool.c pool-file.c pool-sub.c
-LIBMANS                        += pool.3
-
-###--------------------------------------------------------------------------
-### Hashing.
+SUBDIRS                        += mem
+libmLib_la_LIBADD      += mem/libmem.la
 
-## CRC32.
-pkginclude_HEADERS     += crc32.h
-libmLib_la_SOURCES     += crc32.c crc32-tab.c
-LIBMANS                        += crc32.3
+## User interface.
+SUBDIRS                        += ui
+libmLib_la_LIBADD      += ui/libui.la
 
-bin_PROGRAMS           += crc-mktab
-crc_mktab_SOURCES       = crc-mktab.c $(UTIL_SOURCES)
-crc_mktab_LDADD                 = libutils.la
-PROGMANS               += crc-mktab.1
+## Hashing.
+SUBDIRS                        += hash
+libmLib_la_LIBADD      += hash/libhash.la
 
-BUILT_SOURCES          += crc32-tab.c
-CLEANFILES             += crc32-tab.c
-crc32-tab.c: crc-mktab$(EXEEXT)
-       ./crc-mktab -o $@.new \
-               -p0x04c11db7 -b32 -B8 -r -c \
-               -scrc32_table -icrc32.h -tuint32 && \
-       mv $@.new $@
+## Data structures.
+SUBDIRS                        += struct
+libmLib_la_LIBADD      += struct/libstruct.la
 
-## Universal hashing.
-pkginclude_HEADERS     += unihash.h
-libutils_la_SOURCES    += unihash.c
-libmLib_la_SOURCES     += unihash-global.c
-BUILT_SOURCES          += unihash-global.c
-LIBMANS                        += unihash.3
+## Encoding and decoding.
+SUBDIRS                        += codec
+libmLib_la_LIBADD      += codec/libcodec.la
 
-bin_PROGRAMS           += unihash-mkstatic
-unihash_mkstatic_SOURCES = unihash-mkstatic.c
-unihash_mkstatic_LDADD  = libutils.la
-PROGMANS               += unihash-mkstatic.1
+## System utilities.
+SUBDIRS                        += sys
+libmLib_la_LIBADD      += sys/libsys.la
 
-BUILT_SOURCES          += unihash-global.c
-CLEANFILES             += unihash-global.c
-unihash-global.c: unihash-mkstatic$(EXEEXT)
-       ./unihash-mkstatic -c -sunihash_global -iunihash.h -o$@.new && \
-               mv $@.new $@
-
-check_PROGRAMS         += unihash.t
-unihash_t_SOURCES       = unihash.c
-unihash_t_CPPFLAGS      = $(TEST_CPPFLAGS)
-unihash_t_LDFLAGS       = -static
-
-tests:: unihash.t unihash.in
-       ./unihash.t -f unihash.in
-
-EXTRA_DIST             += unihash-check.pl
-CLEANFILES             += unihash.in
-unihash.in: unihash-check.pl
-       perl $(srcdir)/unihash-check.pl >$@.new && mv $@.new $@
-
-###--------------------------------------------------------------------------
-### Data structures.
-
-## Dynamic strings.
-pkginclude_HEADERS     += dstr.h dspool.h
-libmLib_la_SOURCES     += dstr.c dputf.c dspool.c
-LIBMANS                        += dstr.3 dspool.3
-
-## Buffers.
-pkginclude_HEADERS     += buf.h
-libmLib_la_SOURCES     += buf.c buf-dstr.c
-LIBMANS                        += buf.3
-
-## Dynamic arrays.
-pkginclude_HEADERS     += darray.h
-libmLib_la_SOURCES     += darray.c
-LIBMANS                        += darray.3
-
-CLEANFILES             += da.out
-tests:: darray.t da.in da.ref
-       ./darray.t <da.in >da.out
-       cmp da.out da.ref
-       @echo "darray OK"
-
-check_PROGRAMS         += darray.t
-darray_t_SOURCES        = da-test.c
-darray_t_CPPFLAGS       = $(TEST_CPPFLAGS)
-darray_t_LDFLAGS        = -static
-
-EXTRA_DIST             += da-gtest
-CLEANFILES             += da.in
-da.in: da-gtest
-       perl $(srcdir)/da-gtest 10000 >$@.new && mv $@.new $@
-
-EXTRA_DIST             += da-ref
-CLEANFILES             += da.ref
-da.ref: da-ref da.in
-       perl $(srcdir)/da-ref <da.in >$@.new && mv $@.new $@
-
-## Hash tables.
-pkginclude_HEADERS     += hash.h
-libmLib_la_SOURCES     += hash.c
-LIBMANS                        += hash.3
-
-## Symbol tables.
-pkginclude_HEADERS     += sym.h
-libmLib_la_SOURCES     += sym.c
-LIBMANS                        += sym.3
-
-CLEANFILES             += sym.out
-tests:: sym.t sym.in sym.ref
-       ./sym.t <sym.in >sym.out
-       cmp sym.out sym.ref
-       @echo "sym OK"
-
-check_PROGRAMS         += sym.t
-sym_t_SOURCES           = sym-test.c
-sym_t_CPPFLAGS          = $(TEST_CPPFLAGS)
-sym_t_LDFLAGS           = -static
-
-EXTRA_DIST             += sym-gtest
-CLEANFILES             += sym.in
-sym.in: sym-gtest
-       perl $(srcdir)/sym-gtest 10000 >$@.new && mv $@.new $@
-
-EXTRA_DIST             += sym-ref
-CLEANFILES             += sym.ref
-sym.ref: sym-ref sym.in
-       perl $(srcdir)/sym-ref <sym.in >$@.new && mv $@.new $@
-
-## Atoms.
-pkginclude_HEADERS     += atom.h
-libmLib_la_SOURCES     += atom.c
-LIBMANS                        += atom.3
-
-## Association tables.
-pkginclude_HEADERS     += assoc.h
-libmLib_la_SOURCES     += assoc.c
-LIBMANS                        += assoc.3
-
-CLEANFILES             += assoc.out
-tests:: assoc.t sym.in sym.ref
-       ./assoc.t <sym.in >assoc.out
-       cmp assoc.out sym.ref
-       @echo "sym OK"
-
-check_PROGRAMS         += assoc.t
-assoc_t_SOURCES                 = assoc-test.c
-assoc_t_CPPFLAGS        = $(TEST_CPPFLAGS)
-assoc_t_LDFLAGS                 = -static
-
-###--------------------------------------------------------------------------
-### User interface.
+## Buffering.
+SUBDIRS                        += buf
+libmLib_la_LIBADD      += buf/libbuf.la
 
-## Option parsing.
-noinst_LTLIBRARIES     += libmdwopt.la
-pkginclude_HEADERS     += mdwopt.h
-libmdwopt_la_SOURCES    = mdwopt.c
-libmdwopt_la_CPPFLAGS   = $(AM_CPPFLAGS) -DBUILDING_MLIB
-libutils_la_LIBADD     += libmdwopt.la
-LIBMANS                        += mdwopt.3
-
-## Program naming.
-pkginclude_HEADERS     += quis.h
-libutils_la_SOURCES    += quis.c pquis.c
-LIBMANS                        += quis.3
-
-## Error reporting.
-pkginclude_HEADERS     += report.h
-libutils_la_SOURCES    += report.c
-LIBMANS                        += report.3
-
-###--------------------------------------------------------------------------
-### Encoding and decoding.
-
-## form-urlencoded
-pkginclude_HEADERS     += url.h
-libmLib_la_SOURCES     += url.c
-LIBMANS                        += url.3
-
-## base64
-pkginclude_HEADERS     += base64.h
-libmLib_la_SOURCES     += base64.c
-LIBMANS                        += base64.3
-
-EXTRA_DIST             += base64.in base64.ref
-CLEANFILES             += base64.out
-tests:: base64.t base64.in base64.ref
-       ./base64.t <$(srcdir)/base64.in >base64.out
-       cmp base64.out $(srcdir)/base64.ref
-       ./base64.t -d <$(srcdir)/base64.ref >base64.out
-       cmp base64.out $(srcdir)/base64.in
-       @echo "base64 OK"
-
-check_PROGRAMS         += base64.t
-base64_t_SOURCES        = base64.c
-base64_t_CPPFLAGS       = $(TEST_CPPFLAGS)
-base64_t_LDFLAGS        = -static
-
-## base32
-pkginclude_HEADERS     += base32.h
-libmLib_la_SOURCES     += base32.c
-LIBMANS                        += base32.3
-
-EXTRA_DIST             += base32.in base32.ref
-CLEANFILES             += base32.out
-tests:: base32.t base32.in base32.ref
-       ./base32.t <$(srcdir)/base32.in >base32.out
-       cmp base32.out $(srcdir)/base32.ref
-       ./base32.t -d <$(srcdir)/base32.ref >base32.out
-       cmp base32.out $(srcdir)/base32.in
-       @echo "base32 OK"
-
-check_PROGRAMS         += base32.t
-base32_t_SOURCES        = base32.c
-base32_t_CPPFLAGS       = $(TEST_CPPFLAGS)
-base32_t_LDFLAGS        = -static
-
-## hex
-pkginclude_HEADERS     += hex.h
-libmLib_la_SOURCES     += hex.c
-LIBMANS                        += hex.3
-
-EXTRA_DIST             += hex.in hex.ref
-CLEANFILES             += hex.out
-tests:: hex.t hex.in hex.ref
-       ./hex.t <$(srcdir)/hex.in >hex.out
-       cmp hex.out $(srcdir)/hex.ref
-       ./hex.t -d <$(srcdir)/hex.ref >hex.out
-       cmp hex.out $(srcdir)/hex.in
-       @echo "hex OK"
-
-check_PROGRAMS         += hex.t
-hex_t_SOURCES           = hex.c
-hex_t_CPPFLAGS          = $(TEST_CPPFLAGS)
-hex_t_LDFLAGS           = -static
-
-###--------------------------------------------------------------------------
-### System utilities.
-
-## Daemons.
-pkginclude_HEADERS     += daemonize.h
-libmLib_la_SOURCES     += daemonize.c
-LIBMANS                        += daemonize.3
-
-## Environment variables.
-pkginclude_HEADERS     += env.h
-libmLib_la_SOURCES     += env.c
-LIBMANS                        += env.3
-
-## File and descriptor flags.
-pkginclude_HEADERS     += fdflags.h
-libmLib_la_SOURCES     += fdflags.c
-LIBMANS                        += fdflags.3
-
-## File descriptor passing.
-pkginclude_HEADERS     += fdpass.h
-libmLib_la_SOURCES     += fdpass.c
-LIBMANS                        += fdpass.3
-
-## Watching files for modification.
-pkginclude_HEADERS     += fwatch.h
-libmLib_la_SOURCES     += fwatch.c
-LIBMANS                        += fwatch.3
-
-## File locking.
-pkginclude_HEADERS     += lock.h
-libmLib_la_SOURCES     += lock.c
-LIBMANS                        += lock.3
-
-## File descriptor juggling.
-pkginclude_HEADERS     += mdup.h
-libmLib_la_SOURCES     += mdup.c
-LIBMANS                        += mdup.3
-
-check_PROGRAMS         += mdup.t
-mdup_t_SOURCES          = mdup-test.c
-mdup_t_CPPFLAGS                 = $(TEST_CPPFLAGS)
-mdup_t_LDFLAGS          = -static
-
-EXTRA_DIST             += mdup-test.sh
-CLEANFILES             += mdup.[0-9]*.out mdup.[0-9]*.err
-tests:: mdup.t mdup-test.sh
-       $(srcdir)/mdup-test.sh
-
-## Time arithmetic.
-pkginclude_HEADERS     += tv.h
-libmLib_la_SOURCES     += tv.c
-LIBMANS                        += tv.3
-
-###--------------------------------------------------------------------------
-### Buffering.
-
-## Line buffering.
-pkginclude_HEADERS     += lbuf.h
-libmLib_la_SOURCES     += lbuf.c
-LIBMANS                        += lbuf.3
-
-## Packet buffering.
-pkginclude_HEADERS     += pkbuf.h
-libmLib_la_SOURCES     += pkbuf.c
-LIBMANS                        += pkbuf.3
-
-###--------------------------------------------------------------------------
-### Network utilities.
-
-## Core event selection.
-pkginclude_HEADERS     += sel.h
-libmLib_la_SOURCES     += sel.c
-LIBMANS                        += sel.3
-
-## Waiting for buffers to fill.
-pkginclude_HEADERS     += selbuf.h selpk.h
-libmLib_la_SOURCES     += selbuf.c selpk.c
-LIBMANS                        += selbuf.3 selpk.3
-
-## RFC931 identification.
-pkginclude_HEADERS     += ident.h
-libmLib_la_SOURCES     += ident.c
-LIBMANS                        += ident.3
-
-## Nonblocking connections.
-pkginclude_HEADERS     += conn.h
-libmLib_la_SOURCES     += conn.c
-LIBMANS                        += conn.3
-
-## Signal handling
-pkginclude_HEADERS     += sig.h
-libmLib_la_SOURCES     += sig.c
-LIBMANS                        += sig.3
-
-## Name resolution.
-pkginclude_HEADERS     += bres.h
-LIBMANS                        += bres.3
-
-if WITH_ADNS
-libmLib_la_SOURCES     += bres-adns.c
-else
-libmLib_la_SOURCES     += bres.c
-pkglibexec_PROGRAMS    += bres
-bres_SOURCES            = bres.c
-bres_CPPFLAGS           = -DBRES_STANDALONE $(AM_CPPFLAGS)
-bres_LDADD              =
-endif
-
-###--------------------------------------------------------------------------
-### Testing and debugging.
-
-## Tracing.
-pkginclude_HEADERS     += trace.h
-libmLib_la_SOURCES     += trace.c traceopt.c
-LIBMANS                        += trace.3
-
-## Memory tracking.
-pkginclude_HEADERS     += track.h
-libmLib_la_SOURCES     += track.c
+## Event-driven networking.
+SUBDIRS                        += sel
+libmLib_la_LIBADD      += sel/libsel.la
 
 ## Testing.
-pkginclude_HEADERS     += testrig.h
-libmLib_la_SOURCES     += testrig.c
-LIBMANS                        += testrig.3
-
-###--------------------------------------------------------------------------
-### Manual.
+SUBDIRS                        += test
+libmLib_la_LIBADD      += test/libtest.la
 
-EXTRA_DIST             += $(LIBMANS) $(PROGMANS)
-
-install-data-local: install-man
-install-man: $(LIBMANS) $(PROGMANS)
-       @$(NORMAL_INSTALL)
-       $(mkdir_p) $(DESTDIR)$(mandir)
-       $(top_srcdir)/config/maninst \
-               -d $(DESTDIR)$(mandir) -s $(srcdir) \
-               -i "$(INSTALL)" \
-               install $(PROGMANS)
-       $(top_srcdir)/config/maninst \
-               -d $(DESTDIR)$(mandir) -s $(srcdir) \
-               -i "$(INSTALL)" -e $(manext) \
-               install $(LIBMANS)
-.PHONY: install-man
-
-uninstall-local: uninstall-man
-uninstall-man:
-       @$(NORMAL_UNINSTALL)
-       $(top_srcdir)/config/maninst \
-               -d $(DESTDIR)$(mandir) -s $(srcdir) \
-               uninstall $(PROGMANS)
-       $(top_srcdir)/config/maninst \
-               -d $(DESTDIR)$(mandir) -s $(srcdir) -e $(manext) \
-               uninstall $(LIBMANS)
-.PHONY: uninstall-man
+## Tracing.
+SUBDIRS                        += trace
+libmLib_la_LIBADD      += trace/libtrace.la
 
 ###--------------------------------------------------------------------------
 ### Distribution.
@@ -548,4 +121,4 @@ EXTRA_DIST          += debian/mlib2-adns.install
 EXTRA_DIST             += debian/mlib-dev.install
 EXTRA_DIST             += debian/mlib-bin.install
 
-##----- That's all, folks ---------------------------------------------------
+###----- That's all, folks --------------------------------------------------
diff --git a/buf/Makefile.am b/buf/Makefile.am
new file mode 100644 (file)
index 0000000..5c722fb
--- /dev/null
@@ -0,0 +1,45 @@
+### -*-makefile-*-
+###
+### Build script for buffering
+###
+### (c) 2009 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of the mLib utilities library.
+###
+### mLib is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### mLib is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with mLib; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES      = libbuf.la
+libbuf_la_SOURCES       =
+
+###--------------------------------------------------------------------------
+### Component files.
+
+## Line buffering.
+pkginclude_HEADERS     += lbuf.h
+libbuf_la_SOURCES      += lbuf.c
+LIBMANS                        += lbuf.3
+
+## Packet buffering.
+pkginclude_HEADERS     += pkbuf.h
+libbuf_la_SOURCES      += pkbuf.c
+LIBMANS                        += pkbuf.3
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from lbuf.3
rename to buf/lbuf.3
similarity index 100%
rename from lbuf.c
rename to buf/lbuf.c
similarity index 100%
rename from lbuf.h
rename to buf/lbuf.h
similarity index 100%
rename from pkbuf.3
rename to buf/pkbuf.3
similarity index 100%
rename from pkbuf.c
rename to buf/pkbuf.c
similarity index 100%
rename from pkbuf.h
rename to buf/pkbuf.h
diff --git a/codec/Makefile.am b/codec/Makefile.am
new file mode 100644 (file)
index 0000000..71a4e48
--- /dev/null
@@ -0,0 +1,97 @@
+### -*-makefile-*-
+###
+### Build script for encoding and decoding
+###
+### (c) 2009 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of the mLib utilities library.
+###
+### mLib is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### mLib is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with mLib; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES      = libcodec.la
+libcodec_la_SOURCES     =
+
+###--------------------------------------------------------------------------
+### Component files.
+
+## form-urlencoded
+pkginclude_HEADERS     += url.h
+libcodec_la_SOURCES    += url.c
+LIBMANS                        += url.3
+
+## base64
+pkginclude_HEADERS     += base64.h
+libcodec_la_SOURCES    += base64.c
+LIBMANS                        += base64.3
+
+EXTRA_DIST             += base64.in base64.ref
+CLEANFILES             += base64.out
+tests:: base64.t base64.in base64.ref
+       ./base64.t <$(srcdir)/base64.in >base64.out
+       cmp base64.out $(srcdir)/base64.ref
+       ./base64.t -d <$(srcdir)/base64.ref >base64.out
+       cmp base64.out $(srcdir)/base64.in
+       @echo "base64 OK"
+
+check_PROGRAMS         += base64.t
+base64_t_SOURCES        = base64.c
+base64_t_CPPFLAGS       = $(TEST_CPPFLAGS)
+base64_t_LDFLAGS        = -static
+
+## base32
+pkginclude_HEADERS     += base32.h
+libcodec_la_SOURCES    += base32.c
+LIBMANS                        += base32.3
+
+EXTRA_DIST             += base32.in base32.ref
+CLEANFILES             += base32.out
+tests:: base32.t base32.in base32.ref
+       ./base32.t <$(srcdir)/base32.in >base32.out
+       cmp base32.out $(srcdir)/base32.ref
+       ./base32.t -d <$(srcdir)/base32.ref >base32.out
+       cmp base32.out $(srcdir)/base32.in
+       @echo "base32 OK"
+
+check_PROGRAMS         += base32.t
+base32_t_SOURCES        = base32.c
+base32_t_CPPFLAGS       = $(TEST_CPPFLAGS)
+base32_t_LDFLAGS        = -static
+
+## hex
+pkginclude_HEADERS     += hex.h
+libcodec_la_SOURCES    += hex.c
+LIBMANS                        += hex.3
+
+EXTRA_DIST             += hex.in hex.ref
+CLEANFILES             += hex.out
+tests:: hex.t hex.in hex.ref
+       ./hex.t <$(srcdir)/hex.in >hex.out
+       cmp hex.out $(srcdir)/hex.ref
+       ./hex.t -d <$(srcdir)/hex.ref >hex.out
+       cmp hex.out $(srcdir)/hex.in
+       @echo "hex OK"
+
+check_PROGRAMS         += hex.t
+hex_t_SOURCES           = hex.c
+hex_t_CPPFLAGS          = $(TEST_CPPFLAGS)
+hex_t_LDFLAGS           = -static
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from base32.3
rename to codec/base32.3
similarity index 100%
rename from base32.c
rename to codec/base32.c
similarity index 100%
rename from base32.h
rename to codec/base32.h
similarity index 100%
rename from base32.in
rename to codec/base32.in
similarity index 100%
rename from base32.ref
rename to codec/base32.ref
similarity index 100%
rename from base64.3
rename to codec/base64.3
similarity index 100%
rename from base64.c
rename to codec/base64.c
similarity index 100%
rename from base64.h
rename to codec/base64.h
similarity index 100%
rename from base64.in
rename to codec/base64.in
similarity index 100%
rename from base64.ref
rename to codec/base64.ref
similarity index 100%
rename from hex.3
rename to codec/hex.3
similarity index 100%
rename from hex.c
rename to codec/hex.c
similarity index 100%
rename from hex.h
rename to codec/hex.h
similarity index 100%
rename from hex.in
rename to codec/hex.in
similarity index 100%
rename from hex.ref
rename to codec/hex.ref
similarity index 100%
rename from url.3
rename to codec/url.3
similarity index 100%
rename from url.c
rename to codec/url.c
similarity index 100%
rename from url.h
rename to codec/url.h
index 6a2eb52ec56fbc1b720753d3844693a25eef7930..d2af6c7b811d1cd6035501adae654df6bf5e5520 100644 (file)
@@ -99,7 +99,18 @@ dnl Output.
 AC_CONFIG_HEADER([config/config.h])
 
 AC_CONFIG_FILES(
-  [Makefile])
+  [Makefile]
+  [buf/Makefile]
+  [codec/Makefile]
+  [hash/Makefile]
+  [mem/Makefile]
+  [sel/Makefile]
+  [struct/Makefile]
+  [sys/Makefile]
+  [test/Makefile]
+  [trace/Makefile]
+  [ui/Makefile]
+  [utils/Makefile])
 AC_OUTPUT
 
 dnl ----- That's all, folks -------------------------------------------------
diff --git a/hash/Makefile.am b/hash/Makefile.am
new file mode 100644 (file)
index 0000000..26099d6
--- /dev/null
@@ -0,0 +1,90 @@
+### -*-makefile-*-
+###
+### Build script for hashing
+###
+### (c) 2009 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of the mLib utilities library.
+###
+### mLib is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### mLib is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with mLib; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES      = libhash.la
+libhash_la_SOURCES      =
+libhash_la_LIBADD       =
+
+###--------------------------------------------------------------------------
+### Component files.
+
+## CRC32.
+pkginclude_HEADERS     += crc32.h
+libhash_la_SOURCES     += crc32.c
+LIBMANS                        += crc32.3
+
+bin_PROGRAMS           += crc-mktab
+crc_mktab_SOURCES       = crc-mktab.c
+crc_mktab_LDADD                 = $(UTIL_LIBS)
+PROGMANS               += crc-mktab.1
+
+libhash_la_SOURCES     += crc32-tab.c
+CLEANFILES             += crc32-tab.c
+crc32-tab.c:
+       @$(build_util_libs)
+       @$(MAKE) crc-mktab$(EXEEXT)
+       ./crc-mktab -o $@.new \
+               -p0x04c11db7 -b32 -B8 -r -c \
+               -scrc32_table -icrc32.h -tuint32 && \
+       mv $@.new $@
+
+## Universal hashing.
+pkginclude_HEADERS     += unihash.h
+noinst_LTLIBRARIES     += libunihash.la
+libunihash_la_SOURCES   = unihash.c
+libhash_la_LIBADD      += libunihash.la
+LIBMANS                        += unihash.3
+
+bin_PROGRAMS           += unihash-mkstatic
+unihash_mkstatic_SOURCES = unihash-mkstatic.c
+unihash_mkstatic_LDADD  = libunihash.la $(UTIL_LIBS)
+PROGMANS               += unihash-mkstatic.1
+
+libhash_la_SOURCES     += unihash-global.c
+CLEANFILES             += unihash-global.c
+unihash-global.c:
+       @$(build_util_libs)
+       @$(MAKE) unihash-mkstatic$(EXEEXT)
+       ./unihash-mkstatic -c -sunihash_global -iunihash.h -o$@.new && \
+               mv $@.new $@
+
+check_PROGRAMS         += unihash.t
+unihash_t_SOURCES       = unihash.c
+unihash_t_CPPFLAGS      = $(TEST_CPPFLAGS)
+unihash_t_LDFLAGS       = -static
+
+tests:: unihash.t unihash.in
+       ./unihash.t -f unihash.in
+
+EXTRA_DIST             += unihash-check.pl
+CLEANFILES             += unihash.in
+unihash.in: unihash-check.pl
+       perl $(srcdir)/unihash-check.pl >$@.new && mv $@.new $@
+
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from crc-mktab.1
rename to hash/crc-mktab.1
similarity index 100%
rename from crc-mktab.c
rename to hash/crc-mktab.c
similarity index 100%
rename from crc32.3
rename to hash/crc32.3
similarity index 100%
rename from crc32.c
rename to hash/crc32.c
similarity index 100%
rename from crc32.h
rename to hash/crc32.h
similarity index 100%
rename from unihash-check.pl
rename to hash/unihash-check.pl
similarity index 100%
rename from unihash-mkstatic.1
rename to hash/unihash-mkstatic.1
similarity index 100%
rename from unihash-mkstatic.c
rename to hash/unihash-mkstatic.c
similarity index 100%
rename from unihash.3
rename to hash/unihash.3
similarity index 100%
rename from unihash.c
rename to hash/unihash.c
similarity index 100%
rename from unihash.h
rename to hash/unihash.h
diff --git a/mem/Makefile.am b/mem/Makefile.am
new file mode 100644 (file)
index 0000000..7beb771
--- /dev/null
@@ -0,0 +1,55 @@
+### -*-makefile-*-
+###
+### Build script for memory allocation
+###
+### (c) 2009 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of the mLib utilities library.
+###
+### mLib is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### mLib is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with mLib; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES      = libmem.la
+libmem_la_SOURCES       =
+
+###--------------------------------------------------------------------------
+### Component files.
+
+## Arena abstraction.
+pkginclude_HEADERS     += arena.h
+libmem_la_SOURCES      += arena.c
+LIBMANS                        += arena.3
+
+## Memory allocation with exceptions.
+pkginclude_HEADERS     += alloc.h
+libmem_la_SOURCES      += alloc.c
+LIBMANS                        += alloc.3
+
+## Slab allocator.
+pkginclude_HEADERS     += sub.h
+libmem_la_SOURCES      += sub.c
+LIBMANS                        += sub.3
+
+## Pool allocator.
+pkginclude_HEADERS     += pool.h
+libmem_la_SOURCES      += pool.c pool-file.c pool-sub.c
+LIBMANS                        += pool.3
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from alloc.3
rename to mem/alloc.3
similarity index 100%
rename from alloc.c
rename to mem/alloc.c
similarity index 100%
rename from alloc.h
rename to mem/alloc.h
similarity index 100%
rename from arena.3
rename to mem/arena.3
similarity index 100%
rename from arena.c
rename to mem/arena.c
similarity index 100%
rename from arena.h
rename to mem/arena.h
similarity index 100%
rename from pool-file.c
rename to mem/pool-file.c
similarity index 100%
rename from pool-sub.c
rename to mem/pool-sub.c
similarity index 100%
rename from pool.3
rename to mem/pool.3
similarity index 100%
rename from pool.c
rename to mem/pool.c
similarity index 100%
rename from pool.h
rename to mem/pool.h
diff --git a/sub.3 b/mem/sub.3
similarity index 100%
rename from sub.3
rename to mem/sub.3
diff --git a/sub.c b/mem/sub.c
similarity index 100%
rename from sub.c
rename to mem/sub.c
diff --git a/sub.h b/mem/sub.h
similarity index 100%
rename from sub.h
rename to mem/sub.h
similarity index 100%
rename from track.c
rename to mem/track.c
similarity index 100%
rename from track.h
rename to mem/track.h
diff --git a/sel/Makefile.am b/sel/Makefile.am
new file mode 100644 (file)
index 0000000..2e87e7d
--- /dev/null
@@ -0,0 +1,74 @@
+### -*-makefile-*-
+###
+### Build script for event-driven networking
+###
+### (c) 2009 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of the mLib utilities library.
+###
+### mLib is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### mLib is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with mLib; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES      = libsel.la
+libsel_la_SOURCES       =
+
+###--------------------------------------------------------------------------
+### Component files.
+
+## Core event selection.
+pkginclude_HEADERS     += sel.h
+libsel_la_SOURCES      += sel.c
+LIBMANS                        += sel.3
+
+## Waiting for buffers to fill.
+pkginclude_HEADERS     += selbuf.h selpk.h
+libsel_la_SOURCES      += selbuf.c selpk.c
+LIBMANS                        += selbuf.3 selpk.3
+
+## RFC931 identification.
+pkginclude_HEADERS     += ident.h
+libsel_la_SOURCES      += ident.c
+LIBMANS                        += ident.3
+
+## Nonblocking connections.
+pkginclude_HEADERS     += conn.h
+libsel_la_SOURCES      += conn.c
+LIBMANS                        += conn.3
+
+## Signal handling
+pkginclude_HEADERS     += sig.h
+libsel_la_SOURCES      += sig.c
+LIBMANS                        += sig.3
+
+## Name resolution.
+pkginclude_HEADERS     += bres.h
+LIBMANS                        += bres.3
+
+if WITH_ADNS
+libsel_la_SOURCES      += bres-adns.c
+else
+libsel_la_SOURCES      += bres.c
+pkglibexec_PROGRAMS     = bres
+bres_SOURCES            = bres.c
+bres_CPPFLAGS           = -DBRES_STANDALONE $(AM_CPPFLAGS)
+bres_LDADD              =
+endif
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from bres-adns.c
rename to sel/bres-adns.c
similarity index 100%
rename from bres.3
rename to sel/bres.3
similarity index 100%
rename from bres.c
rename to sel/bres.c
similarity index 100%
rename from bres.h
rename to sel/bres.h
similarity index 100%
rename from conn.3
rename to sel/conn.3
similarity index 100%
rename from conn.c
rename to sel/conn.c
similarity index 100%
rename from conn.h
rename to sel/conn.h
similarity index 100%
rename from ident.3
rename to sel/ident.3
similarity index 100%
rename from ident.c
rename to sel/ident.c
similarity index 100%
rename from ident.h
rename to sel/ident.h
diff --git a/sel.3 b/sel/sel.3
similarity index 100%
rename from sel.3
rename to sel/sel.3
diff --git a/sel.c b/sel/sel.c
similarity index 100%
rename from sel.c
rename to sel/sel.c
diff --git a/sel.h b/sel/sel.h
similarity index 100%
rename from sel.h
rename to sel/sel.h
similarity index 100%
rename from selbuf.3
rename to sel/selbuf.3
similarity index 100%
rename from selbuf.c
rename to sel/selbuf.c
similarity index 100%
rename from selbuf.h
rename to sel/selbuf.h
similarity index 100%
rename from selpk.3
rename to sel/selpk.3
similarity index 100%
rename from selpk.c
rename to sel/selpk.c
similarity index 100%
rename from selpk.h
rename to sel/selpk.h
diff --git a/sig.3 b/sel/sig.3
similarity index 100%
rename from sig.3
rename to sel/sig.3
diff --git a/sig.c b/sel/sig.c
similarity index 100%
rename from sig.c
rename to sel/sig.c
diff --git a/sig.h b/sel/sig.h
similarity index 100%
rename from sig.h
rename to sel/sig.h
diff --git a/struct/Makefile.am b/struct/Makefile.am
new file mode 100644 (file)
index 0000000..280e52d
--- /dev/null
@@ -0,0 +1,123 @@
+### -*-makefile-*-
+###
+### Build script for data structures
+###
+### (c) 2009 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of the mLib utilities library.
+###
+### mLib is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### mLib is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with mLib; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES      = libstruct.la
+libstruct_la_SOURCES    =
+
+###--------------------------------------------------------------------------
+### Component files.
+
+## Dynamic strings.
+pkginclude_HEADERS     += dstr.h dspool.h
+libstruct_la_SOURCES   += dstr.c dstr-putf.c dspool.c
+LIBMANS                        += dstr.3 dspool.3
+
+## Buffers.
+pkginclude_HEADERS     += buf.h
+libstruct_la_SOURCES   += buf.c buf-dstr.c
+LIBMANS                        += buf.3
+
+## Dynamic arrays.
+pkginclude_HEADERS     += darray.h
+libstruct_la_SOURCES   += darray.c
+LIBMANS                        += darray.3
+
+CLEANFILES             += da.out
+tests:: darray.t da.in da.ref
+       ./darray.t <da.in >da.out
+       cmp da.out da.ref
+       @echo "darray OK"
+
+check_PROGRAMS         += darray.t
+darray_t_SOURCES        = da-test.c
+darray_t_CPPFLAGS       = $(TEST_CPPFLAGS)
+darray_t_LDFLAGS        = -static
+
+EXTRA_DIST             += da-gtest
+CLEANFILES             += da.in
+da.in: da-gtest
+       perl $(srcdir)/da-gtest 10000 >$@.new && mv $@.new $@
+
+EXTRA_DIST             += da-ref
+CLEANFILES             += da.ref
+da.ref: da-ref da.in
+       perl $(srcdir)/da-ref <da.in >$@.new && mv $@.new $@
+
+## Hash tables.
+pkginclude_HEADERS     += hash.h
+libstruct_la_SOURCES   += hash.c
+LIBMANS                        += hash.3
+
+## Symbol tables.
+pkginclude_HEADERS     += sym.h
+libstruct_la_SOURCES   += sym.c
+LIBMANS                        += sym.3
+
+CLEANFILES             += sym.out
+tests:: sym.t sym.in sym.ref
+       ./sym.t <sym.in >sym.out
+       cmp sym.out sym.ref
+       @echo "sym OK"
+
+check_PROGRAMS         += sym.t
+sym_t_SOURCES           = sym-test.c
+sym_t_CPPFLAGS          = $(TEST_CPPFLAGS)
+sym_t_LDFLAGS           = -static
+
+EXTRA_DIST             += sym-gtest
+CLEANFILES             += sym.in
+sym.in: sym-gtest
+       perl $(srcdir)/sym-gtest 10000 >$@.new && mv $@.new $@
+
+EXTRA_DIST             += sym-ref
+CLEANFILES             += sym.ref
+sym.ref: sym-ref sym.in
+       perl $(srcdir)/sym-ref <sym.in >$@.new && mv $@.new $@
+
+## Atoms.
+pkginclude_HEADERS     += atom.h
+libstruct_la_SOURCES   += atom.c
+LIBMANS                        += atom.3
+
+## Association tables.
+pkginclude_HEADERS     += assoc.h
+libstruct_la_SOURCES   += assoc.c
+LIBMANS                        += assoc.3
+
+CLEANFILES             += assoc.out
+tests:: assoc.t sym.in sym.ref
+       ./assoc.t <sym.in >assoc.out
+       cmp assoc.out sym.ref
+       @echo "sym OK"
+
+check_PROGRAMS         += assoc.t
+assoc_t_SOURCES                 = assoc-test.c
+assoc_t_CPPFLAGS        = $(TEST_CPPFLAGS)
+assoc_t_LDFLAGS                 = -static
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from assoc-test.c
rename to struct/assoc-test.c
similarity index 100%
rename from assoc.3
rename to struct/assoc.3
similarity index 100%
rename from assoc.c
rename to struct/assoc.c
similarity index 100%
rename from assoc.h
rename to struct/assoc.h
similarity index 100%
rename from atom.3
rename to struct/atom.3
similarity index 100%
rename from atom.c
rename to struct/atom.c
similarity index 100%
rename from atom.h
rename to struct/atom.h
similarity index 100%
rename from buf-dstr.c
rename to struct/buf-dstr.c
similarity index 100%
rename from buf.3
rename to struct/buf.3
similarity index 100%
rename from buf.c
rename to struct/buf.c
similarity index 100%
rename from buf.h
rename to struct/buf.h
similarity index 100%
rename from da-gtest
rename to struct/da-gtest
similarity index 100%
rename from da-ref
rename to struct/da-ref
similarity index 100%
rename from da-test.c
rename to struct/da-test.c
similarity index 100%
rename from darray.3
rename to struct/darray.3
similarity index 100%
rename from darray.c
rename to struct/darray.c
similarity index 100%
rename from darray.h
rename to struct/darray.h
similarity index 100%
rename from dspool.3
rename to struct/dspool.3
similarity index 100%
rename from dspool.c
rename to struct/dspool.c
similarity index 100%
rename from dspool.h
rename to struct/dspool.h
similarity index 100%
rename from dputf.c
rename to struct/dstr-putf.c
similarity index 100%
rename from dstr.3
rename to struct/dstr.3
similarity index 100%
rename from dstr.c
rename to struct/dstr.c
similarity index 100%
rename from dstr.h
rename to struct/dstr.h
similarity index 100%
rename from hash.3
rename to struct/hash.3
similarity index 100%
rename from hash.c
rename to struct/hash.c
similarity index 100%
rename from hash.h
rename to struct/hash.h
similarity index 100%
rename from sym-gtest
rename to struct/sym-gtest
similarity index 100%
rename from sym-ref
rename to struct/sym-ref
similarity index 100%
rename from sym-test.c
rename to struct/sym-test.c
similarity index 100%
rename from sym.3
rename to struct/sym.3
similarity index 100%
rename from sym.c
rename to struct/sym.c
similarity index 100%
rename from sym.h
rename to struct/sym.h
diff --git a/sys/Makefile.am b/sys/Makefile.am
new file mode 100644 (file)
index 0000000..5a0adb7
--- /dev/null
@@ -0,0 +1,85 @@
+### -*-makefile-*-
+###
+### Build script for system utilities
+###
+### (c) 2009 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of the mLib utilities library.
+###
+### mLib is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### mLib is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with mLib; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES      = libsys.la
+libsys_la_SOURCES       =
+
+###--------------------------------------------------------------------------
+### Component files.
+
+## Daemons.
+pkginclude_HEADERS     += daemonize.h
+libsys_la_SOURCES      += daemonize.c
+LIBMANS                        += daemonize.3
+
+## Environment variables.
+pkginclude_HEADERS     += env.h
+libsys_la_SOURCES      += env.c
+LIBMANS                        += env.3
+
+## File and descriptor flags.
+pkginclude_HEADERS     += fdflags.h
+libsys_la_SOURCES      += fdflags.c
+LIBMANS                        += fdflags.3
+
+## File descriptor passing.
+pkginclude_HEADERS     += fdpass.h
+libsys_la_SOURCES      += fdpass.c
+LIBMANS                        += fdpass.3
+
+## Watching files for modification.
+pkginclude_HEADERS     += fwatch.h
+libsys_la_SOURCES      += fwatch.c
+LIBMANS                        += fwatch.3
+
+## File locking.
+pkginclude_HEADERS     += lock.h
+libsys_la_SOURCES      += lock.c
+LIBMANS                        += lock.3
+
+## File descriptor juggling.
+pkginclude_HEADERS     += mdup.h
+libsys_la_SOURCES      += mdup.c
+LIBMANS                        += mdup.3
+
+check_PROGRAMS         += mdup.t
+mdup_t_SOURCES          = mdup-test.c
+mdup_t_CPPFLAGS                 = $(TEST_CPPFLAGS)
+mdup_t_LDFLAGS          = -static
+
+EXTRA_DIST             += mdup-test.sh
+CLEANFILES             += mdup.[0-9]*.out mdup.[0-9]*.err
+tests:: mdup.t mdup-test.sh
+       $(srcdir)/mdup-test.sh
+
+## Time arithmetic.
+pkginclude_HEADERS     += tv.h
+libsys_la_SOURCES      += tv.c
+LIBMANS                        += tv.3
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from daemonize.3
rename to sys/daemonize.3
similarity index 100%
rename from daemonize.c
rename to sys/daemonize.c
similarity index 100%
rename from daemonize.h
rename to sys/daemonize.h
diff --git a/env.3 b/sys/env.3
similarity index 100%
rename from env.3
rename to sys/env.3
diff --git a/env.c b/sys/env.c
similarity index 100%
rename from env.c
rename to sys/env.c
diff --git a/env.h b/sys/env.h
similarity index 100%
rename from env.h
rename to sys/env.h
similarity index 100%
rename from fdflags.3
rename to sys/fdflags.3
similarity index 100%
rename from fdflags.c
rename to sys/fdflags.c
similarity index 100%
rename from fdflags.h
rename to sys/fdflags.h
similarity index 100%
rename from fdpass.3
rename to sys/fdpass.3
similarity index 100%
rename from fdpass.c
rename to sys/fdpass.c
similarity index 100%
rename from fdpass.h
rename to sys/fdpass.h
similarity index 100%
rename from fwatch.3
rename to sys/fwatch.3
similarity index 100%
rename from fwatch.c
rename to sys/fwatch.c
similarity index 100%
rename from fwatch.h
rename to sys/fwatch.h
similarity index 100%
rename from lock.3
rename to sys/lock.3
similarity index 100%
rename from lock.c
rename to sys/lock.c
similarity index 100%
rename from lock.h
rename to sys/lock.h
similarity index 100%
rename from mdup-test.c
rename to sys/mdup-test.c
similarity index 100%
rename from mdup-test.sh
rename to sys/mdup-test.sh
similarity index 100%
rename from mdup.3
rename to sys/mdup.3
similarity index 100%
rename from mdup.c
rename to sys/mdup.c
similarity index 100%
rename from mdup.h
rename to sys/mdup.h
diff --git a/tv.3 b/sys/tv.3
similarity index 100%
rename from tv.3
rename to sys/tv.3
diff --git a/tv.c b/sys/tv.c
similarity index 100%
rename from tv.c
rename to sys/tv.c
diff --git a/tv.h b/sys/tv.h
similarity index 100%
rename from tv.h
rename to sys/tv.h
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644 (file)
index 0000000..e81daed
--- /dev/null
@@ -0,0 +1,40 @@
+### -*-makefile-*-
+###
+### Build script for testing
+###
+### (c) 2009 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of the mLib utilities library.
+###
+### mLib is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### mLib is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with mLib; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES      = libtest.la
+libtest_la_SOURCES      =
+
+###--------------------------------------------------------------------------
+### Component files.
+
+## Testing.
+pkginclude_HEADERS     += testrig.h
+libtest_la_SOURCES     += testrig.c
+LIBMANS                        += testrig.3
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from testrig.3
rename to test/testrig.3
similarity index 100%
rename from testrig.c
rename to test/testrig.c
similarity index 100%
rename from testrig.h
rename to test/testrig.h
diff --git a/trace/Makefile.am b/trace/Makefile.am
new file mode 100644 (file)
index 0000000..45d362f
--- /dev/null
@@ -0,0 +1,40 @@
+### -*-makefile-*-
+###
+### Build script for tracing
+###
+### (c) 2009 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of the mLib utilities library.
+###
+### mLib is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### mLib is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with mLib; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES      = libtrace.la
+libtrace_la_SOURCES     =
+
+###--------------------------------------------------------------------------
+### Component files.
+
+## Tracing.
+pkginclude_HEADERS     += trace.h
+libtrace_la_SOURCES    += trace.c traceopt.c
+LIBMANS                        += trace.3
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from trace.3
rename to trace/trace.3
similarity index 100%
rename from trace.c
rename to trace/trace.c
similarity index 100%
rename from trace.h
rename to trace/trace.h
similarity index 100%
rename from traceopt.c
rename to trace/traceopt.c
diff --git a/ui/Makefile.am b/ui/Makefile.am
new file mode 100644 (file)
index 0000000..ab70a70
--- /dev/null
@@ -0,0 +1,54 @@
+### -*-makefile-*-
+###
+### Build script for user interface
+###
+### (c) 2009 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of the mLib utilities library.
+###
+### mLib is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### mLib is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with mLib; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES      = libui.la
+libui_la_SOURCES        =
+libui_la_LIBADD                 =
+
+###--------------------------------------------------------------------------
+### Component files.
+
+## Option parsing.
+noinst_LTLIBRARIES     += libmdwopt.la
+pkginclude_HEADERS     += mdwopt.h
+libmdwopt_la_SOURCES    = mdwopt.c
+libmdwopt_la_CPPFLAGS   = $(AM_CPPFLAGS) -DBUILDING_MLIB
+libui_la_LIBADD                += libmdwopt.la
+LIBMANS                        += mdwopt.3
+
+## Program naming.
+pkginclude_HEADERS     += quis.h
+libui_la_SOURCES       += quis.c pquis.c
+LIBMANS                        += quis.3
+
+## Error reporting.
+pkginclude_HEADERS     += report.h
+libui_la_SOURCES       += report.c
+LIBMANS                        += report.3
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from mdwopt.3
rename to ui/mdwopt.3
similarity index 100%
rename from pquis.c
rename to ui/pquis.c
similarity index 100%
rename from quis.3
rename to ui/quis.3
similarity index 100%
rename from quis.c
rename to ui/quis.c
similarity index 100%
rename from quis.h
rename to ui/quis.h
similarity index 100%
rename from report.3
rename to ui/report.3
similarity index 100%
rename from report.c
rename to ui/report.c
similarity index 100%
rename from report.h
rename to ui/report.h
diff --git a/utils/Makefile.am b/utils/Makefile.am
new file mode 100644 (file)
index 0000000..226e86a
--- /dev/null
@@ -0,0 +1,80 @@
+### -*-makefile-*-
+###
+### Build script for utilities
+###
+### (c) 2009 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of the mLib utilities library.
+###
+### mLib is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### mLib is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with mLib; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+include $(top_srcdir)/vars.am
+
+noinst_LTLIBRARIES      = libutils.la
+libutils_la_SOURCES     =
+
+###--------------------------------------------------------------------------
+### Component files.
+
+## Utility macros.
+pkginclude_HEADERS     += macros.h
+LIBMANS                        += macros.3
+
+## Alignment.
+pkginclude_HEADERS     += align.h
+LIBMANS                        += align.3
+
+## Bit manipulation.
+pkginclude_HEADERS     += bits.h
+LIBMANS                        += bits.3
+
+EXTRA_DIST             += bits.in bits-testgen.c
+tests:: bits.t bits.in
+       ./bits.t -f $(srcdir)/bits.in
+
+check_PROGRAMS         += bits.t
+bits_t_SOURCES          = bits.c
+bits_t_CPPFLAGS                 = $(TEST_CPPFLAGS)
+bits_t_LDFLAGS          = -static
+
+## Exceptions.
+pkginclude_HEADERS     += exc.h
+libutils_la_SOURCES    += exc.c
+LIBMANS                        += exc.3
+
+## String handling.
+pkginclude_HEADERS     += str.h
+libutils_la_SOURCES    += str.c
+LIBMANS                        += str.3
+
+## Version comparison.
+pkginclude_HEADERS     += versioncmp.h
+libutils_la_SOURCES    += versioncmp.c
+LIBMANS                        += versioncmp.3
+
+EXTRA_DIST             += versioncmp.in
+tests:: versioncmp.t versioncmp.in
+       ./versioncmp.t -f $(srcdir)/versioncmp.in
+
+check_PROGRAMS         += versioncmp.t
+versioncmp_t_SOURCES    = versioncmp-test.c
+versioncmp_t_CPPFLAGS   = $(TEST_CPPFLAGS)
+versioncmp_t_LDFLAGS    = -static
+
+###----- That's all, folks --------------------------------------------------
similarity index 100%
rename from align.3
rename to utils/align.3
similarity index 100%
rename from align.h
rename to utils/align.h
similarity index 100%
rename from bits-testgen.c
rename to utils/bits-testgen.c
similarity index 100%
rename from bits.3
rename to utils/bits.3
similarity index 100%
rename from bits.c
rename to utils/bits.c
similarity index 100%
rename from bits.h
rename to utils/bits.h
similarity index 100%
rename from bits.in
rename to utils/bits.in
similarity index 100%
rename from exc.3
rename to utils/exc.3
similarity index 100%
rename from exc.c
rename to utils/exc.c
similarity index 100%
rename from exc.h
rename to utils/exc.h
similarity index 100%
rename from exctest.c
rename to utils/exctest.c
similarity index 100%
rename from macros.3
rename to utils/macros.3
similarity index 100%
rename from macros.h
rename to utils/macros.h
similarity index 100%
rename from str.3
rename to utils/str.3
similarity index 100%
rename from str.c
rename to utils/str.c
similarity index 100%
rename from str.h
rename to utils/str.h
similarity index 100%
rename from versioncmp-test.c
rename to utils/versioncmp-test.c
similarity index 100%
rename from versioncmp.3
rename to utils/versioncmp.3
similarity index 100%
rename from versioncmp.c
rename to utils/versioncmp.c
similarity index 100%
rename from versioncmp.h
rename to utils/versioncmp.h
similarity index 100%
rename from versioncmp.in
rename to utils/versioncmp.in
diff --git a/vars.am b/vars.am
new file mode 100644 (file)
index 0000000..c6f7884
--- /dev/null
+++ b/vars.am
@@ -0,0 +1,128 @@
+### -*-Makefile-*-
+###
+### Common build-system definition
+###
+### (c) 1998 Straylight/Edgeware
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of the mLib utilities library.
+###
+### mLib is free software; you can redistribute it and/or modify
+### it under the terms of the GNU Library General Public License as
+### published by the Free Software Foundation; either version 2 of the
+### License, or (at your option) any later version.
+###
+### mLib is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+### GNU Library General Public License for more details.
+###
+### You should have received a copy of the GNU Library General Public
+### License along with mLib; if not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+### MA 02111-1307, USA.
+
+###--------------------------------------------------------------------------
+### Installation directories.
+
+pkglibexecdir           = $(libexecdir)/$(PACKAGE)
+
+###--------------------------------------------------------------------------
+### Initial values for common variables.
+
+bin_PROGRAMS            =
+check_PROGRAMS          =
+pkginclude_HEADERS      =
+PROGMANS                =
+LIBMANS                         =
+EXTRA_DIST              = $(LIBMANS) $(PROGMANS)
+CLEANFILES              =
+MAINTAINERCLEANFILES    = 
+
+###--------------------------------------------------------------------------
+### Include path.
+
+MLIB_INCLUDES = \
+       -I$(top_srcdir)/buf \
+       -I$(top_srcdir)/codec \
+       -I$(top_srcdir)/hash \
+       -I$(top_srcdir)/mem \
+       -I$(top_srcdir)/net \
+       -I$(top_srcdir)/struct \
+       -I$(top_srcdir)/sys \
+       -I$(top_srcdir)/test \
+       -I$(top_srcdir)/trace \
+       -I$(top_srcdir)/ui \
+       -I$(top_srcdir)/utils
+
+CPPFLAGS += $(MLIB_INCLUDES)
+
+###--------------------------------------------------------------------------
+### Miscellaneous useful definitions.
+
+## Substitute tags in files.
+confsubst               = $(top_srcdir)/config/confsubst
+
+SUBSTITUTIONS = \
+       prefix=$(prefix) exec_prefix=$(exec_prefix) \
+       libdir=$(libdir) includedir=$(includedir) \
+       bindir=$(bindir) sbindir=$(sbindir) \
+       PACKAGE=$(PACKAGE) VERSION=$(VERSION)
+
+###--------------------------------------------------------------------------
+### Building utilities.
+
+## Which libraries we need.
+UTIL_LIBS = \
+       $(top_builddir)/ui/libui.la \
+       $(top_builddir)/utils/libutils.la
+
+## Making sure they're built properly.  Without this, `make dist' on a bare
+## source tree fails hopelessly.
+build_util_libs = \
+       for i in ui utils; do \
+         (cd $(top_builddir)/$$i && $(MAKE) lib$$i.la) || exit 1; \
+       done
+
+###--------------------------------------------------------------------------
+### Testing.
+
+TEST_CPPFLAGS           = -DTEST_RIG -DSRCDIR="\"$(srcdir)\"" $(AM_CPPFLAGS)
+LDADD                   = $(top_builddir)/libmLib.la
+
+check: tests
+.PHONY: check tests
+
+###--------------------------------------------------------------------------
+### Manual.
+
+EXTRA_DIST             += $(LIBMANS) $(PROGMANS)
+
+install-data-local: install-man
+install-man: $(LIBMANS) $(PROGMANS)
+       @$(NORMAL_INSTALL)
+       $(mkdir_p) $(DESTDIR)$(mandir)
+       $(top_srcdir)/config/maninst \
+               -d $(DESTDIR)$(mandir) -s $(srcdir) \
+               -i "$(INSTALL)" \
+               install $(PROGMANS)
+       $(top_srcdir)/config/maninst \
+               -d $(DESTDIR)$(mandir) -s $(srcdir) \
+               -i "$(INSTALL)" -e $(manext) \
+               install $(LIBMANS)
+.PHONY: install-man
+
+uninstall-local: uninstall-man
+uninstall-man:
+       @$(NORMAL_UNINSTALL)
+       $(top_srcdir)/config/maninst \
+               -d $(DESTDIR)$(mandir) -s $(srcdir) \
+               uninstall $(PROGMANS)
+       $(top_srcdir)/config/maninst \
+               -d $(DESTDIR)$(mandir) -s $(srcdir) -e $(manext) \
+               uninstall $(LIBMANS)
+.PHONY: uninstall-man
+
+###----- That's all, folks --------------------------------------------------