Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/cm/tools/main/tools-fn.sml
ViewVC logotype

Diff of /sml/trunk/cm/tools/main/tools-fn.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2577, Tue May 22 16:48:30 2007 UTC revision 2578, Tue May 22 16:48:57 2007 UTC
# Line 15  Line 15 
15      val say = Say.say      val say = Say.say
16      val vsay = Say.vsay      val vsay = Say.vsay
17    
18        fun boolcontrol (name, doc, default) =
19            StdConfig.new (ControlUtil.Cvt.bool, name, doc, default)
20        fun stringcontrol (name, doc, default) =
21            StdConfig.new (ControlUtil.Cvt.string, name, doc, default)
22    
23        val tolerate_tool_failures =
24            boolcontrol ("tolerate-tool-failures",
25                         "let CM continue if a tool fails \
26                         \as long as target files exist",
27                         false)
28    
29      fun mkCmdName cmdStdPath =      fun mkCmdName cmdStdPath =
30          (* The result of this function should not be cached. Otherwise          (* The result of this function should not be cached. Otherwise
31           * a later addition or change of an anchor will go unnoticed. *)           * a later addition or change of an anchor will go unnoticed. *)
# Line 66  Line 77 
77              in              in
78                  Say.vsay ["[", cmd, "]\n"];                  Say.vsay ["[", cmd, "]\n"];
79                  if OS.Process.system cmd = OS.Process.success then ()                  if OS.Process.system cmd = OS.Process.success then ()
80                  else if targetsExist targets then                  else if #get tolerate_tool_failures ()
81                            andalso targetsExist targets then
82                      Say.say ["[*** WARNING: \"", cmd, "\" failed ***]\n\                      Say.say ["[*** WARNING: \"", cmd, "\" failed ***]\n\
83                               \[*** using potentially outdated targets ***]\n"]                               \[*** using potentially outdated targets ***]\n"]
84                  else err cmd                  else err cmd
# Line 121  Line 133 
133          val _ = registerClass (toolclass, toolrule)          val _ = registerClass (toolclass, toolrule)
134          val _ = registerClass (suffixclass, suffixrule)          val _ = registerClass (suffixclass, suffixrule)
135      end      end
   
     fun boolcontrol (name, doc, default) =  
         StdConfig.new (ControlUtil.Cvt.bool, name, doc, default)  
     fun stringcontrol (name, doc, default) =  
         StdConfig.new (ControlUtil.Cvt.string, name, doc, default)  
136  end  end

Legend:
Removed from v.2577  
changed lines
  Added in v.2578

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0