summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
Diffstat (limited to 'dist')
-rwxr-xr-xdist/s_docs11
-rwxr-xr-xdist/s_style2
-rw-r--r--dist/wtperf_config.py25
3 files changed, 32 insertions, 6 deletions
diff --git a/dist/s_docs b/dist/s_docs
index e2b1d2aed11..e78ecb1dabb 100755
--- a/dist/s_docs
+++ b/dist/s_docs
@@ -1,7 +1,7 @@
#! /bin/sh
t=__wt.$$
-trap 'rm -f $t /tmp/__doxy' 0 1 2 3 13 15
+trap 'rm -f $t' 0 1 2 3 13 15
# Skip this when building release packages: docs are built separately
test -n "$WT_RELEASE_BUILD" && exit 0
@@ -30,18 +30,19 @@ wtperf_config()
{
# The Linux ed command writes line numbers to stderr, redirect both
# stdout and stderr to keep things quiet.
- cc -o /tmp/__doxy ../bench/wtperf/doxy.c &&
+ cat ../bench/wtperf/wtperf_opt.i |
+ cpp -DOPT_DEFINE_DOXYGEN |
+ python wtperf_config.py > $t
(echo '/START_AUTO_GENERATED_WTPERF_CONFIGURATION/+3,/STOP_AUTO_GENERATED_WTPERF_CONFIGURATION/-1d'
echo 'i'
echo ''
echo '.'
- echo ".r !/tmp/__doxy"
+ echo ".r $t"
echo 'a'
echo ''
echo '.'
echo 'w'
- echo 'q') | ed ../src/docs/wtperf.dox 1>/dev/null 2>/dev/null &&
- rm -f /tmp/__doxy
+ echo 'q') | ed ../src/docs/wtperf.dox 1>/dev/null 2>/dev/null
}
structurechk()
diff --git a/dist/s_style b/dist/s_style
index 3860a23b991..8e755224ee2 100755
--- a/dist/s_style
+++ b/dist/s_style
@@ -108,7 +108,7 @@ else
! expr "$f" : 'test/.*' > /dev/null &&
! expr "$f" : '.*/utilities/.*' > /dev/null; then
if ! expr "$f" : '.*/os_alloc.c' > /dev/null &&
- egrep '[[:space:]]free[(]|[[:space:]]strdup[(]|[[:space:]]strndup[(]|[[:space:]]malloc[(]|[[:space:]]calloc[(]|[[:space:]]realloc[(]' $f > $t; then
+ egrep '[[:space:]]free[(]|[[:space:]]strdup[(]|[[:space:]]strndup[(]|[[:space:]]malloc[(]|[[:space:]]calloc[(]|[[:space:]]realloc[(]|[[:space:]]sprintf[(]' $f > $t; then
test -s $t && {
echo "$f: call to illegal function"
cat $t
diff --git a/dist/wtperf_config.py b/dist/wtperf_config.py
new file mode 100644
index 00000000000..72256ed5527
--- /dev/null
+++ b/dist/wtperf_config.py
@@ -0,0 +1,25 @@
+# Output a doxgen version of the wtperf configuration options.
+import string, sys
+
+for line in sys.stdin:
+ if not line.startswith('OPTION '):
+ continue
+
+ line = line.replace('OPTION ', '')
+ v = line.split('",')
+ v[0] = v[0].replace('"', '').strip()
+ v[1] = v[1].replace('"', '').strip()
+ v[2] = v[2].replace('"', '').strip()
+ v[3] = v[3].replace('"', '').strip()
+
+ if v[3] == 'boolean':
+ if v[2] == '0':
+ d = 'false'
+ else:
+ d = 'true'
+ elif v[3] == 'string':
+ d = '"' + v[2] + '"'
+ else:
+ d = v[2]
+ print '@par ' + v[0] + ' (' + v[3] + ', default=' + d + ')'
+ print v[1]