From 342fde1b129dd952cdd37f2a168f78ed78f755ab Mon Sep 17 00:00:00 2001 From: davi Date: Thu, 29 Nov 2007 03:49:39 +0000 Subject: [PATCH] Added man pages and pc file. --- Makefile.am | 7 ++++-- configure.ac | 4 +-- gendocs | 2 ++ man/Makefile.am | 2 ++ man/cmph.1 | 67 +++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 78 insertions(+), 4 deletions(-) create mode 100644 man/Makefile.am create mode 100644 man/cmph.1 diff --git a/Makefile.am b/Makefile.am index a8d050c..fc9a62a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,2 +1,5 @@ -SUBDIRS = src tests examples -EXTRA_DIST = cmph.spec configure.ac +SUBDIRS = src tests examples man +EXTRA_DIST = cmph.spec configure.ac cmph.pc.in + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = cmph.pc diff --git a/configure.ac b/configure.ac index 4a56077..8e10ff5 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.am) -AM_INIT_AUTOMAKE(cmph, 0.6) +AM_INIT_AUTOMAKE(cmph, 0.7) AM_CONFIG_HEADER(config.h) dnl Checks for programs. @@ -35,4 +35,4 @@ dnl Checks for library functions. AC_CHECK_SPOON dnl AC_OUTPUT(Makefile tests/Makefile samples/Makefile) -AC_OUTPUT(Makefile src/Makefile tests/Makefile examples/Makefile) +AC_OUTPUT(Makefile src/Makefile tests/Makefile examples/Makefile man/Makefile cmph.pc) diff --git a/gendocs b/gendocs index 05be819..d3c05a4 100755 --- a/gendocs +++ b/gendocs @@ -1,3 +1,5 @@ +#!/bin/sh + txt2tags -t html --mask-email -i README.t2t -o index.html txt2tags -t html -i BMZ.t2t -o bmz.html txt2tags -t html -i BRZ.t2t -o brz.html diff --git a/man/Makefile.am b/man/Makefile.am new file mode 100644 index 0000000..40d83ce --- /dev/null +++ b/man/Makefile.am @@ -0,0 +1,2 @@ +man_MANS = cmph.1 +EXTRA_DIST=cmph.1 diff --git a/man/cmph.1 b/man/cmph.1 new file mode 100644 index 0000000..cdc717a --- /dev/null +++ b/man/cmph.1 @@ -0,0 +1,67 @@ +.TH CMPH "1" "October 2007" "cmph 0.6" "User Commands" +.SH NAME +cmph \- minimum perfect hashing tool +.SH SYNOPSIS +.B cmph +[-v] [-h] [-V] [-k nkeys] [-f hash_function] [-g [-c value][-s seed] ] [-a algorithm] [-M memory_in_MB] [-b BRZ_parameter] [-d tmp_dir] [-m file.mph] keysfile +.SH DESCRIPTION +.PP +Command line tool to generate and query minimal perfect hash functions. +.PP +Please refer to http://cmph.sf.net for full documentation. +.TP +\fB\-h\fR +Print an help message +.TP +\fB\-c\fR +This value determines: the number of vertices in the graph for the algorithms BMZ and CHM; the number of bits per key required in the FCH algorithm +.TP +\fB\-a\fR +Algorithm. Valid values are: bmz, bmz8, chm, brz, fch +.TP +\fB\-f\fR +hash function (may be used multiple times). valid values are: djb2, fnv, jenkins, sdbm +.TP +\fB\-V\fR +Print version number and exit +.TP +\fB\-v\fR +Increase verbosity (may be used multiple times) +.TP +\fB\-k\fR +Number of keys +.TP +\fB\-g\fR +Generation mode +.TP +\fB\-s\fR +Random seed +.TP +\fB\-m\fR +Minimum perfect hash function file +.TP +\fB\-M\fR +Main memory availability (in MB) +.TP +\fB\-d\fR +Temporary directory used in brz algorithm +.TP +\fB\-b\fR +Parameter of BRZ algorithm to make the maximal number of keys in a bucket lower than 256 +.TP +\fBkeysfile\fR +Line separated file with keys +.SH EXAMPLE +$ # Using the default algorithm (chm) for constructing a mphf +.br +$ # for keys in file keys_file. Lines in keys_file _must_ be unique. +.br +$ ./cmph -v -g keys_file +.br +$ # Query id of keys in the file keys_query +.br +$ ./cmph -v -m keys_file.mph keys_query +.SH AUTHOR +This manual page was written by Enrico Tassi , +for the Debian project (but may be used by others). +