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/system/smlnj/installer/libinstall.sml
ViewVC logotype

Diff of /sml/trunk/src/system/smlnj/installer/libinstall.sml

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

revision 1410, Mon Nov 3 22:32:01 2003 UTC revision 1411, Tue Nov 4 17:50:53 2003 UTC
# Line 35  Line 35 
35                                  val compare = String.compare)                                  val compare = String.compare)
36    
37      fun say l = TextIO.output (TextIO.stdErr, concat l)      fun say l = TextIO.output (TextIO.stdErr, concat l)
38        fun warn l = say ("WARNING: " :: l)
39      fun fail l = (say ("FAILURE: " :: l);      fun fail l = (say ("FAILURE: " :: l);
40                    OS.Process.exit OS.Process.failure)                    OS.Process.exit OS.Process.failure)
41    
# Line 141  Line 142 
142                | NONE => fail ["no targetsfiles\n"]                | NONE => fail ["no targetsfiles\n"]
143    
144          (* parse the targets file *)          (* parse the targets file *)
145          fun loop (mv, ml) =          fun loop ml =
146              case TextIO.inputLine s of              case TextIO.inputLine s of
147                  NONE => (TextIO.closeIn s; (mv, ml))                  NONE => (TextIO.closeIn s; ml)
148                | SOME l =>                | SOME l =>
149                    if String.sub (l, 0) = #"#" then loop (mv, ml)                    if String.sub (l, 0) = #"#" then loop ml
150                    else (case String.tokens Char.isSpace l of                    else (case String.tokens Char.isSpace l of
151                              ["dont_move_libraries"] => loop (false, ml)                              [x as ("dont_move_libraries" |
152                            | ["move_libraries"] => loop (true, ml)                                     "move_libraries")] =>
153                            | ["request", module] => loop (mv, module :: ml)                                (warn ["\"", x, "\" no longer supported",
154                            | [] => loop (mv, ml)                                       " (installer always moves libraries)\n"];
155                                   loop ml)
156                              | ["request", module] => loop (module :: ml)
157                              | [] => loop ml
158                            | _ => fail ["ill-formed targets line: ", l])                            | _ => fail ["ill-formed targets line: ", l])
159    
160          val (move_libraries, modules) = loop (true, [])          val modules = loop []
161    
162          (* now resolve dependencies; get full list of modules          (* now resolve dependencies; get full list of modules
163           * in correct build order: *)           * in correct build order: *)
# Line 235  Line 239 
239                                               P.concat (arch_oskind, relbase)))                                               P.concat (arch_oskind, relbase)))
240              val srcfinalloc = P.concat (adir, relloc)              val srcfinalloc = P.concat (adir, relloc)
241              val (finalloc, finalconfigpath) =              val (finalloc, finalconfigpath) =
                 if move_libraries then  
242                      (P.concat (libdir,                      (P.concat (libdir,
243                                 P.concat (finalanchor, relloc)),                                 P.concat (finalanchor, relloc)),
244                       finalanchor)                       finalanchor)
                 else  
                     (srcfinalloc, adir)  
245          in          in
246              if fexists finalloc then              if fexists finalloc then
247                  (say ["Library ", libname, " already existed in ",                  (say ["Library ", libname, " already existed in ",
# Line 258  Line 259 
259                   stablist := (fn () => CM.stabilize false libname)                   stablist := (fn () => CM.stabilize false libname)
260                               :: !stablist;                               :: !stablist;
261                   #set (CM.Anchor.anchor anchor) (SOME adir);                   #set (CM.Anchor.anchor anchor) (SOME adir);
262                   if move_libraries then                   movlist := movelib srcfinalloc finalloc :: !movlist;
                      movlist := movelib srcfinalloc finalloc :: !movlist  
                  else ();  
263                   write_cm_pathconfig (finalanchor, finalconfigpath))                   write_cm_pathconfig (finalanchor, finalconfigpath))
264          end          end
265    

Legend:
Removed from v.1410  
changed lines
  Added in v.1411

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