Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /trunk/src/compiler/common/paths_sml.in
ViewVC logotype

Diff of /trunk/src/compiler/common/paths_sml.in

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

revision 1232, Mon May 16 23:37:52 2011 UTC revision 1640, Wed Nov 16 02:19:51 2011 UTC
# Line 42  Line 42 
42              in              in
43                 String.fields (fn #":" => true | _ => false) path                 String.fields (fn #":" => true | _ => false) path
44              end (* getPath *)              end (* getPath *)
45  (* FIXME: with SML/NJ 110.73, we'll be able to use PathUtil.findExe *)        fun findExe (paths, name) = (case PathUtil.findExe paths name
46        fun findExe (paths, name) = let               of SOME p => p
             fun isExe p = OS.FileSys.access(p, [OS.FileSys.A_EXEC])  
             in  
               if OS.Path.isAbsolute name  
                 then if isExe name  
                   then name  
                   else raise Fail(name ^" is not executable")  
                 else (case PathUtil.existsFile isExe paths name  
                    of SOME cmd => cmd  
47                      | NONE => raise Fail(concat["unable to find ", name, " executable"])                      | NONE => raise Fail(concat["unable to find ", name, " executable"])
48                    (* end case *))                    (* end case *))
             end  
49      in      in
50      val dnorm = findExe ([diderotBin, installBin, diderotSrc // "dnorm"], "dnorm")      val dnorm = findExe ([diderotBin, installBin, diderotSrc // "dnorm"], "dnorm")
51      val cc = let      val cc = let

Legend:
Removed from v.1232  
changed lines
  Added in v.1640

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