]> diplodocus.org Git - nmh/commitdiff
Add a 'tools' subdirectory. This is a home for developer-oriented
authorLyndon Nerenberg <lyndon@orthanc.ca>
Wed, 7 May 2014 19:07:03 +0000 (12:07 -0700)
committerLyndon Nerenberg <lyndon@orthanc.ca>
Wed, 7 May 2014 19:07:03 +0000 (12:07 -0700)
scripts and such which can't be run from the Makefile(s) due to
system dependencies.

tools/README [new file with mode: 0644]
tools/csa [new file with mode: 0755]

diff --git a/tools/README b/tools/README
new file mode 100644 (file)
index 0000000..b5b20f4
--- /dev/null
@@ -0,0 +1,12 @@
+This directory contains tools, scripts, and supporting files used
+by the developers while writing, debugging, and testing the code.
+By definition, anything in this directory is not portable.  The
+files can (and probably do) depends on specific programs being
+installed, might only run on a specific operating system release,
+or have dependacies on the ritual sacrifice of politicians.
+
+In the interest of consistency, scripts or programs placed here
+should be written to be invoked from the top-level nmh source code
+directory.  E.g., 'tools/csa' should do the right thing when run
+from this directory's parent.  If that's not possible, please add
+a note here or in the relevant script saying how to run things.
diff --git a/tools/csa b/tools/csa
new file mode 100755 (executable)
index 0000000..f2f91bf
--- /dev/null
+++ b/tools/csa
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Run the clang static analyzer across the code base.
+# The '--user-analyzer /usr/bin/clang' is here to work around a bug
+# in the version of CSA for MacOS.  It runs the wrong clang binary, otherwise.
+#
+# Note: you must run configure before running this script.
+
+echo cleaning ...; make clean >/dev/null 2>&1
+scan-build -V -v -stats -maxloop 10 --use-analyzer /usr/bin/clang -o /tmp/nmh make