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/src/cm/tools/make/tool.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/tools/make/tool.sml

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

revision 1536, Tue Jul 13 18:30:33 2004 UTC revision 1537, Tue Jul 13 18:49:54 2004 UTC
# Line 9  Line 9 
9      local      local
10          open Tools          open Tools
11    
12            structure C = StdConfig.MakeTool
13    
14          val tool = "Make-Command"       (* the name of this tool *)          val tool = "Make-Command"       (* the name of this tool *)
15          val class = "make"              (* the name of the class *)          val class = "make"              (* the name of the class *)
         val stdCmdPath = "make"         (* the shell command to invoke it *)  
16          val kw_class = "class"          val kw_class = "class"
17          val kw_options = "options"          val kw_options = "options"
18    
# Line 47  Line 48 
48                   [{ name = str, mkpath = mkpath,                   [{ name = str, mkpath = mkpath,
49                      class = tclass, opts = topts, derived = true }])                      class = tclass, opts = topts, derived = true }])
50              fun runcmd () = let              fun runcmd () = let
51                  val cmdname = mkCmdName stdCmdPath                  val cmdname = mkCmdName (#get C.command ())
52                    val bindir =
53                        if #get C.pass_bindir () then
54                            case #get (CM.Anchor.anchor "bindir") () of
55                                NONE => ""
56                              | SOME d => " SMLNJ_BINDIR=" ^ d
57                        else ""
58                  val tname =                  val tname =
59                      if OS.Path.isAbsolute tname then                      if OS.Path.isAbsolute tname then
60                          OS.Path.mkRelative                          OS.Path.mkRelative
# Line 55  Line 62 
62                                relativeTo = OS.FileSys.getDir () }                                relativeTo = OS.FileSys.getDir () }
63                      else tname                      else tname
64                  val cmd = concat (cmdname :: foldr (fn (x, l) => " " :: x :: l)                  val cmd = concat (cmdname :: foldr (fn (x, l) => " " :: x :: l)
65                                                     [" ", tname] mopts)                                                     [bindir, " ", tname] mopts)
66              in              in
67                  vsay ["[", cmd, "]\n"];                  vsay ["[", cmd, "]\n"];
68                  if OS.Process.system cmd = OS.Process.success then ()                  if OS.Process.system cmd = OS.Process.success then ()
# Line 67  Line 74 
74          end          end
75      in      in
76          val _ = registerClass (class, rule)          val _ = registerClass (class, rule)
77            structure Control = C
78      end      end
79  end  end

Legend:
Removed from v.1536  
changed lines
  Added in v.1537

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