SCM Repository
View of /branches/pure-cfg/src/compiler/common/paths_in.sml
Parent Directory
|
Revision Log
Revision 627 -
(download)
(annotate)
Wed Mar 16 15:56:07 2011 UTC (11 years, 3 months ago) by jhr
File size: 1509 byte(s)
Wed Mar 16 15:56:07 2011 UTC (11 years, 3 months ago) by jhr
File size: 1509 byte(s)
New file
(* paths_in.sml * * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu) * All rights reserved. *) structure Paths = struct (* directories for Diderot stuff *) val diderotBin = "@DIDEROT_ROOT@/bin" val diderotInclude = "@DIDEROT_ROOT@/src/include" val diderotLib = "@DIDEROT_ROOT@/src/lib" (* directories for Teem stuff *) val teemBin = "@TEEM_DIR@/bin" val teemInclude = "@TEEM_DIR@/include" val teemLib = "@TEEM_DIR@/lib" (* installation directories for Diderot stuff *) val installBin = "@prefix@/bin" val installInclude = "@prefix@/src/include" val installLib = "@prefix@/src/lib" (* paths to some useful tools *) local (* get the user's PATH environment variable as a list of paths. Note that this is * executed at build time. *) val PATH = let val path = (case (OS.Process.getEnv "PATH") of (SOME p) => p | _ => "") in String.fields (fn #":" => true | _ => false) path end (* getPath *) (* FIXME: with SML/NJ 110.73, we'll be able to use PathUtil.findExe *) fun findExe (paths, name) = let fun isExe p = OS.FileSys.access(p, [OS.FileSys.A_EXEC]) in case PathUtil.existsFile isExe paths name of SOME cmd => cmd | NONE => raise Fail(concat["unable to find ", name " executable"]) (* end case *) end in val dnorm = findExe ([diderotBin, installBin], "dnorm") val cc = findExe (PATH, "@CC@") end (* local *) end
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |