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

SCM Repository

[smlnj] Annotation of /sml/trunk/src/system/smlnj/installer/nixlibinstall.sml
ViewVC logotype

Annotation of /sml/trunk/src/system/smlnj/installer/nixlibinstall.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1409 - (view) (download)

1 : mblume 1391 (*
2 :     * Unix-specific invocation of LibInstall.proc (see libinstall.sml).
3 :     *
4 :     * Copyright (c) 2003 by The Fellowship of SML/NJ
5 :     *
6 :     * Author: Matthias Blume (blume@tti-c.org)
7 :     *)
8 :     structure UnixLibInstall : sig end = struct
9 :    
10 :     fun proc () = let
11 :     val home = valOf (OS.Process.getEnv "ROOT")
12 : mblume 1409 val installdir = getOpt (OS.Process.getEnv "INSTALLDIR", home)
13 : mblume 1391 val configdir = getOpt (OS.Process.getEnv "CONFIGDIR",
14 :     OS.Path.concat (home, "config"))
15 :     val unpack = OS.Path.concat (configdir, "unpack")
16 :     val bindir = getOpt (OS.Process.getEnv "BINDIR",
17 : mblume 1409 OS.Path.concat (installdir, "bin"))
18 : mblume 1391 fun bincmd cmd = OS.Path.concat (bindir, cmd)
19 :     val runsml = bincmd ".run-sml"
20 :     in
21 :     LibInstall.proc { smlnjroot = home,
22 : mblume 1409 installdir = installdir,
23 : mblume 1391 buildcmd = "CM_LOCAL_PATHCONFIG=/dev/null ./build",
24 :     unpackcmd = SOME unpack,
25 :     instcmd = fn target => let
26 :     val new = bincmd target
27 :     in
28 :     if OS.FileSys.access (new, []) then
29 :     ()
30 :     else
31 :     Posix.FileSys.symlink
32 :     { old = runsml, new = new }
33 :     end }
34 :     end
35 :    
36 :     val _ = proc ()
37 :     end

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