Changes necessary and proper to get mgear to build rsync:
[mgear/mgear.git] / testsuite
index 8cb46a0..f7ec807 100755 (executable)
--- a/testsuite
+++ b/testsuite
@@ -56,7 +56,7 @@ function assert_saw {
 }
 function assert_not_saw {
        if ! grep -q "$@" mgear.log; then
-               echo "Good, saw '${@:$#}' in build log."
+               echo "Good, didn't see '${@:$#}' in build log."
        else
                echo "Did not expect '${@:$#}' in build log but saw it!"
                fail
@@ -118,8 +118,10 @@ include mgear.mk
 .SECONDARY:
 
 include hc-rule.mk
-$(call mg-define-rule,%,%.ssc,sleep 1 && grep 'warn' $$< && sed -e 's_//.*$$$$__' $$< >$$t)
-$(call mg-define-rule,index,index.in,sort $$< >$$t)
+cmd-ssc=sleep 1 && grep 'warn' $< && sed -e 's_//.*$$__' $< >$@
+$(call mg-define-rule,%,%.ssc,cmd-ssc)
+cmd-index=sort $< >$@
+$(call mg-define-rule,index,index.in,cmd-index)
 
 clean:
        $(call mg-clean-cmd,.)
@@ -127,7 +129,8 @@ clean:
 EOF
 
 cat >hc-rule.mk <<'EOF'
-$(call mg-define-rule,%,%.hc,sed -e 's_#.*$$$$__' $$< >$$t)
+cmd-hc=sed -e 's_$(hash).*$$__' $< >$@
+$(call mg-define-rule,%,%.hc,cmd-hc)
 EOF
 
 # Input files.
@@ -218,10 +221,12 @@ EOF
 
 # Change the rule for # comments to strip spaces before a #.
 # Make sure foo is updated properly.
+# Also, make sure commas in commands work properly.
 
 start_section "Command change for % <- %.hc"
 cat >hc-rule.mk <<'EOF'
-$(call mg-define-rule,%,%.hc,sed -e 's_ *#.*$$$$__' $$< >$$t)
+cmd-hc=sed -e 's, *$(hash).*$$,,' $< >$@
+$(call mg-define-rule,%,%.hc,cmd-hc)
 EOF
 do_mgear foo