diff options
author | hunt <hunt> | 2005-06-14 21:39:51 +0000 |
---|---|---|
committer | hunt <hunt> | 2005-06-14 21:39:51 +0000 |
commit | cc637c9ef930cd8af20f3163fc251a6507df59fb (patch) | |
tree | 080adbcecf6b399813791963b7f2961134e86737 /runtime/probes | |
parent | 5ece94302a589a2f5e8f3025d797b2f8a8194efc (diff) | |
download | systemtap-steved-cc637c9ef930cd8af20f3163fc251a6507df59fb.tar.gz systemtap-steved-cc637c9ef930cd8af20f3163fc251a6507df59fb.tar.xz systemtap-steved-cc637c9ef930cd8af20f3163fc251a6507df59fb.zip |
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.
Diffstat (limited to 'runtime/probes')
-rwxr-xr-x | runtime/probes/build | 81 |
1 files changed, 81 insertions, 0 deletions
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 .. +} + |