From: simon Date: Mon, 3 Nov 2008 21:55:54 +0000 (+0000) Subject: Various polishing: man page tweaks, --version now does something, X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/agedu/commitdiff_plain/e6fde1f73e5a102d808e0b2dc7f3367b7054dc5b Various polishing: man page tweaks, --version now does something, the bob and automake framework builds, ships and installs the man page. git-svn-id: svn://svn.tartarus.org/sgt/agedu@8267 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/Buildscr b/Buildscr index 151c65b..a49e7d0 100644 --- a/Buildscr +++ b/Buildscr @@ -4,6 +4,9 @@ module agedu +# Build the man page. +in agedu do make doc + in agedu do sed '/AC_INIT/s/6.66/r$(revision)/' configure.ac > tmp.ac in agedu do mv tmp.ac configure.ac in agedu do aclocal diff --git a/Makefile.am b/Makefile.am index fe5671c..6c549a8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,3 +2,4 @@ bin_PROGRAMS = agedu agedu_SOURCES = agedu.c du.c alloc.c trie.c index.c html.c httpd.c \ fgetline.c licence.c agedu_LDADD = $(LIBOBJS) +man1_MANS = agedu.1 diff --git a/TODO b/TODO index e362fa2..2f5c2d3 100644 --- a/TODO +++ b/TODO @@ -9,8 +9,6 @@ Before it's non-embarrassingly releasable: + later glibcs have fdopendir, hooray! So we can use that too, if it's available and O_NOATIME is too. - - man page, --version. - Future possibilities: - IPv6 support in the HTTP server diff --git a/agedu.but b/agedu.but index a6a5dfe..3eb481a 100644 --- a/agedu.but +++ b/agedu.but @@ -68,7 +68,10 @@ along the lines of \c URL: http://127.164.152.163:48638/ (That URL will always begin with \cq{127.}, meaning that it's in the -\cw{localhost} address space.) +\cw{localhost} address space. So only processes running on the same +computer can even try to connect to that web server, and also there +is access control to prevent other users from seeing it \dash see +below for more detail.) Now paste that URL into your web browser, and you will be shown a graphical representation of the disk usage in \cw{/home/fred} and @@ -241,9 +244,11 @@ whereas \cw{-S} will not. \lcont{ -(Actually, the output will not be exactly identical, due to a -difference in treatment of last-access times on directories. See the -documentation of the \cw{--dir-atime} option in the next section. +(The output will not be exactly \e{identical}, due to a +difference in treatment of last-access times on directories. +However, it should be effectively equivalent for most purposes. See +the documentation of the \cw{--dir-atime} option in the next section +for further detail.) } @@ -556,8 +561,8 @@ files and directories and about 20Gb of data, produced an index file nearly a third of a Gb in size. Furthermore, since the data file must be memory-mapped during most processing, it can never grow larger than available address space, which means that any use of -\cw{agedu} on a seriously large file system is probably going to -have to be done on a 64-bit computer. +\cw{agedu} on a file system more than about ten times the above size +is probably going to have to be done on a 64-bit computer. The data structure also does not usefully permit access control within the data file, so it would be difficult \dash even given the diff --git a/agedu.c b/agedu.c index 8a6affb..4914057 100644 --- a/agedu.c +++ b/agedu.c @@ -616,7 +616,12 @@ int main(int argc, char **argv) usage(stdout); return 0; case OPT_VERSION: - printf("FIXME: version();\n"); +#ifdef PACKAGE_VERSION + printf("%s, revision %s\n", PNAME, PACKAGE_VERSION); +#else + printf("%s: version number not available when not built" + " via automake\n", PNAME); +#endif return 0; case OPT_LICENCE: { diff --git a/agedu.h b/agedu.h index 2ad9a5b..4f6d874 100644 --- a/agedu.h +++ b/agedu.h @@ -2,6 +2,8 @@ * Central header file for agedu, defining various useful things. */ +#include "config.h" + #define PNAME "agedu" #define DUMPHDR "agedu dump file. pathsep="