From 827336a63aeaa331be2bb8a4a058f470d93c2d87 Mon Sep 17 00:00:00 2001 From: Christian Thaeter Date: Sun, 30 May 2010 05:41:08 +0200 Subject: [PATCH] Some Pending cosmetics and small fixes --- configure.ac | 9 +-------- doc/buildinstall.txt | 18 ++++++++++++++---- doc/using.txt | 12 ++++++------ src/nobug.h | 2 +- src/nobug_env.c | 2 +- tests/test.sh | 2 +- 6 files changed, 24 insertions(+), 21 deletions(-) diff --git a/configure.ac b/configure.ac index 03df6f3..4d85393 100644 --- a/configure.ac +++ b/configure.ac @@ -36,14 +36,7 @@ AC_CHECK_HEADER([execinfo.h], AC_DEFINE(HAVE_EXECINFO_H)) nobug_FUNC_MMAP_ANON -# -# Need to check for pkg-config, otherwise the next line doesn't work. -# TODO: output a reasonable error message if not present. -# -# should be some AC_CHECK_PROG check, but configure seems to handle that here: -# checking pkg-config is at least version 0.9.0... yes -#AC_CHECK_FILE (pkg-config,[],[]) - +# provide some extra flags for gcc if test x$GCC = xyes; then CONF_CFLAGS="-Wall -Wextra -Werror" else diff --git a/doc/buildinstall.txt b/doc/buildinstall.txt index 2268c2d..a32f328 100644 --- a/doc/buildinstall.txt +++ b/doc/buildinstall.txt @@ -19,9 +19,11 @@ x86 OpenSolaris mostly Builds, but target check fails *BSD planned Need volunteer for testing ------------------------------------------------------------------------------- -NoBug has no mandatory dependencies on other software and libraries, +NoBug has few mandatory dependencies on other software and libraries, some things such as valgrind support are optional and should be automatially -detected during the build, i.e., when ./configure is called. +detected during the build, i.e., when ./configure is called. Nevertheless it +requires 'pkg-config' to be installed, you get some weird errors already at +bootstrapping (autoreconf) when this is not available. HEAD== Release Tarballs;; @@ -99,6 +101,14 @@ Currently, NoBug installs the following: PARA Generating This Documentation;; - $ make nobug_manual.txt - $ ascidoc -a toc nobug_manual.txt +There are Makefile targets for generating the documentation, Either one of the +following does what you may expect: + + $ make nobug_manual.txt nobug_manual.html nobug_manual.pdf + +building the documentation has quite some more dependencies than building +NoBug itself. Unless you are a packager you may want to refer to the online +doc or the shipped 'README' which is actually this full nobug manual. +Generating the documentation requires: gawk, asciidoc, graphviz and some +toolchains to further process docbook (dblatex, ...). diff --git a/doc/using.txt b/doc/using.txt index f52b84c..b413be3 100644 --- a/doc/using.txt +++ b/doc/using.txt @@ -3,11 +3,11 @@ HEAD- Using NoBug;; Your application will have to include the header file 'nobug.h' before NoBug can be used: - #include "nobug.h" + #include Once you've included the NoBug API in your application, you'll then have to select -a 'build-level'. Build-levels are discussed later, c.f., +a 'build-level'. Build-levels are discussed later, c.f., xref:buildlevel[buildlevel]. Build-levels are used to define the amount of information NoBug provides to you. Maximum information is generally required while developing an application and the ALPHA build-level is most apropriate during @@ -23,7 +23,7 @@ following form: #define EBUG_ALPHA - #include "nobug.h" + #include @@ -44,7 +44,7 @@ However, for more flexibility in selecting a build-level, you might wish to define various targets in your makefile, one for each build-level. In such cases, the -D flag in your makefile is most appropriate; so your link line for an ALPHA build with multi-threaded support would look like the following: - + [source,sh] ---------------- gcc -o mybinary -DEBUG_ALPHA $(WHATEVER_FLAGS) mymodule1.o ... mymodulen.o ..../libs/libnobugmt.a @@ -62,7 +62,7 @@ like the following: [source,sh] ---------------- -#include "nobug.h" /* Include the NoBug API */ +#include /* Include the NoBug API */ #define EBUG_ALPHA /* If we have not used the -D Flag in our makefile */ int main() @@ -79,7 +79,7 @@ int main() Many aspects of NoBug can be configured by overriding macros before 'nobug.h' is -included. +included. A project using NoBug can use autoconf to check for execinfo and valgrind: diff --git a/src/nobug.h b/src/nobug.h index 4e98787..62afaeb 100644 --- a/src/nobug.h +++ b/src/nobug.h @@ -2525,7 +2525,7 @@ nobug_section_cleaned (int* self) /* tag this translation unit as unchecked in ALPHA and BETA builds */ -NOBUG_IF_NOT_RELEASE(NOBUG_UNCHECKED); +NOBUG_IF_NOT_RELEASE(NOBUG_UNCHECKED;) #else /* some configuration when compiling nobug */ diff --git a/src/nobug_env.c b/src/nobug_env.c index 66113fc..01c7011 100644 --- a/src/nobug_env.c +++ b/src/nobug_env.c @@ -102,7 +102,7 @@ nobug_env_parse_size_option (const char** env, const char* key, size_t* value) if (!strncasecmp (key, *env+1, strlen (key))) { char* delim = strchr (*env, '='); - if (!delim || sscanf (delim+1, "%zi", value) != 1) + if (!delim || sscanf (delim+1, "%zu", value) != 1) return -1; *env = end + 1; return 1; diff --git a/tests/test.sh b/tests/test.sh index 2b239eb..186d0ac 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -618,7 +618,7 @@ function RUNTESTS() echo " ... PASSED $(($TESTCNT - $SKIPCNT)) TESTS, $SKIPCNT SKIPPED" #rm ,testlog else - echo " ... SUCCEDED $(($TESTCNT - $FAILCNT - $SKIPCNT)) TESTS" + echo " ... SUCCEEDED $(($TESTCNT - $FAILCNT - $SKIPCNT)) TESTS" echo " ... FAILED $FAILCNT TESTS" echo " ... SKIPPED $SKIPCNT TESTS" echo " see ',testlog' for details" -- 2.11.4.GIT