summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/ChangeLog13
-rw-r--r--runtime/Makefile15
-rwxr-xr-xruntime/probes/build81
3 files changed, 109 insertions, 0 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index 2bbf949e..e00e43f0 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,16 @@
+2005-06-14 Martin Hunt <hunt@redhat.com>
+
+ * README: Removed old docs and replaced with simple build
+ instructions.
+
+ * Makefile: New file.
+
+ * probes/build: New file.
+
+2005-06-13 Martin Hunt <hunt@redhat.com>
+
+ * print.c (next_fmt): Move this func to print.c.
+
2005-06-02 Martin Hunt <hunt@redhat.com>
* string.c (_stp_string_cat_cstr): Be sure result is
diff --git a/runtime/Makefile b/runtime/Makefile
new file mode 100644
index 00000000..1b654f67
--- /dev/null
+++ b/runtime/Makefile
@@ -0,0 +1,15 @@
+#
+# Makefile for SystemTap runtime and example probes
+#
+
+all:
+ make -w -C relayfs
+ make -w -C transport
+ make -w -C stpd
+ cd probes; ./build
+
+clean:
+ make -w -C relayfs clean
+ make -w -C transport clean
+ make -w -C stpd clean
+ cd probes; ./build clean
diff --git a/runtime/probes/build b/runtime/probes/build
new file mode 100755
index 00000000..ac9994a9
--- /dev/null
+++ b/runtime/probes/build
@@ -0,0 +1,81 @@
+#!/usr/bin/tclsh
+# -*- tcl -*-
+
+# simple script to do a make or "make clean" in each probe directory
+
+proc usage {} {
+ puts "Usage: build \[clean\]"
+ exit
+}
+
+set clean 0
+
+foreach arg $argv {
+ if {$arg == "clean"} {
+ set clean 1
+ } else {
+ usage
+ }
+}
+
+set dirs {shellsnoop test4 where_func scf}
+
+foreach i $dirs {
+ cd $i
+ if {$clean} {
+ puts "Cleaning $i"
+ if {[catch {exec make clean >& compile.errors} res]} {
+ [exec cat compile.errors]
+ exit
+ }
+ } else {
+ puts "Building $i"
+ if {[catch {exec make >& compile.errors} res]} {
+ puts "\n------------ Compile error in $i -------------------\n"
+ if {[catch {open compile.errors r} fd]} {
+ puts "Compile failed for unknown reasons"
+ exit
+ }
+ while {[gets $fd line] >= 0} {
+ puts $line
+ }
+ close $fd
+ exit
+ } else {
+ if {![catch {open compile.errors r} fd]} {
+ # search for warnings
+ set bad 0
+ while {[gets $fd line] >= 0} {
+ if {[regexp {[^W]*([A-Za-z][A-Za-z0-9_]*)[^\"]*\"([^\"]*)} $line match warn var]} {
+ if {$warn == "Warning"} {
+ switch $var {
+ _stp_ctrl_unregister -
+ _stp_ctrl_register -
+ relay_subbufs_consumed -
+ _stp_ctrl_send -
+ relay_open -
+ relayfs_create_dir -
+ relayfs_remove_dir -
+ relay_close {}
+ default {
+ if {$bad == 0} {
+ puts "\n------------ Unexpected Warnings in $i -------------------\n"
+ }
+ puts $line
+ set bad 1
+ }
+ }
+ }
+ }
+ }
+ close $fd
+ }
+ if {$bad} {
+ exit
+ }
+ }
+ }
+ catch {exec /bin/rm compile.errors}
+ cd ..
+}
+