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

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/common/paths_sml.in
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/common/paths_sml.in

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

revision 730, Sat Apr 2 00:51:15 2011 UTC revision 731, Sat Apr 2 03:15:31 2011 UTC
# Line 9  Line 9 
9  structure Paths =  structure Paths =
10    struct    struct
11    
12        local
13          val // = OS.Path.concat
14          infixr 4 //
15        in
16    (* directories for Diderot stuff *)    (* directories for Diderot stuff *)
17      val diderotBin = "@DIDEROT_ROOT@/bin"      val diderotBin = "@DIDEROT_ROOT@" // "bin"
18      val diderotInclude = "@DIDEROT_ROOT@/src/include"      val diderotInclude = "@DIDEROT_ROOT@" // "src/include"
19      val diderotLib = "@DIDEROT_ROOT@/src/lib"      val diderotLib = "@DIDEROT_ROOT@" // "src/lib"
20    
21    (* directories for Teem stuff *)    (* directories for Teem stuff *)
22      val teemBin = "@TEEM_DIR@/bin"      val teemBin = "@TEEM_DIR@" // "bin"
23      val teemInclude = "@TEEM_DIR@/include"      val teemInclude = "@TEEM_DIR@" // "include"
24      val teemLib = "@TEEM_DIR@/lib"      val teemLib = "@TEEM_DIR@" // "lib"
25    
26    (* installation directories for Diderot stuff *)    (* installation directories for Diderot stuff *)
27      val installBin = "@prefix@/bin"      val installBin = "@prefix@" // "bin"
28      val installInclude = "@prefix@/include"      val installInclude = "@prefix@" // "include"
29      val installLib = "@prefix@/lib"      val installLib = "@prefix@" // "lib"
30        end (* local *)
31    
32    (* paths to some useful tools *)    (* paths to some useful tools *)
33      local      local
# Line 38  Line 43 
43        fun findExe (paths, name) = let        fun findExe (paths, name) = let
44              fun isExe p = OS.FileSys.access(p, [OS.FileSys.A_EXEC])              fun isExe p = OS.FileSys.access(p, [OS.FileSys.A_EXEC])
45              in              in
46                case PathUtil.existsFile isExe paths name                if OS.Path.isAbsolute name
47                    then if isExe name
48                      then name
49                      else raise Fail(name ^" is not executable")
50                    else (case PathUtil.existsFile isExe paths name
51                 of SOME cmd => cmd                 of SOME cmd => cmd
52                  | NONE => raise Fail(concat["unable to find ", name " executable"])                      | NONE => raise Fail(concat["unable to find ", name, " executable"])
53                (* end case *)                    (* end case *))
54              end              end
55      in      in
56      val dnorm = findExe ([diderotBin, installBin], "dnorm")      val dnorm = findExe ([diderotBin, installBin], "dnorm")
57      val cc = findExe (PATH, "@CC@")      val cc = let
58              val (cmd::args) = String.tokens Char.isSpace "@CC@"
59              val cmd = findExe (PATH, cmd)
60              in
61                String.concatWith " " (cmd::args)
62              end
63        val cflags = "@CFLAGS@"
64      end (* local *)      end (* local *)
65    
66    end    end

Legend:
Removed from v.730  
changed lines
  Added in v.731

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