diff src/compiler.sml @ 1164:8679ba87cf3c

sigfile directive
author Adam Chlipala <adamc@hcoop.net>
date Thu, 11 Feb 2010 09:10:01 -0500
parents ed3e5329b60e
children 52c6ac6a59f1
line wrap: on
line diff
--- a/src/compiler.sml	Tue Feb 09 20:08:59 2010 -0500
+++ b/src/compiler.sml	Thu Feb 11 09:10:01 2010 -0500
@@ -55,7 +55,8 @@
      filterUrl : Settings.rule list,
      filterMime : Settings.rule list,
      protocol : string option,
-     dbms : string option
+     dbms : string option,
+     sigFile : string option
 }
 
 type ('src, 'dst) phase = {
@@ -379,6 +380,7 @@
                 val libs = ref []
                 val protocol = ref NONE
                 val dbms = ref NONE
+                val sigFile = ref (Settings.getSigFile ())
 
                 fun finish sources =
                     let
@@ -405,7 +407,8 @@
                             filterMime = rev (!mime),
                             sources = sources,
                             protocol = !protocol,
-                            dbms = !dbms
+                            dbms = !dbms,
+                            sigFile = !sigFile
                         }
 
                         fun mergeO f (old, new) =
@@ -446,7 +449,8 @@
                                       @ List.filter (fn s => List.all (fn s' => s' <> s) (#sources new))
                                                     (#sources old),
                             protocol = mergeO #2 (#protocol old, #protocol new),
-                            dbms = mergeO #2 (#dbms old, #dbms new)
+                            dbms = mergeO #2 (#dbms old, #dbms new),
+                            sigFile = mergeO #2 (#sigFile old, #sigFile new)
                         }
                     in
                         if accLibs then
@@ -523,6 +527,14 @@
                                 (case !database of
                                      NONE => database := SOME arg
                                    | SOME _ => ())
+                              | "dbms" =>
+                                (case !dbms of
+                                     NONE => dbms := SOME arg
+                                   | SOME _ => ())
+                              | "sigfile" =>
+                                (case !sigFile of
+                                     NONE => sigFile := SOME arg
+                                   | SOME _ => ())
                               | "exe" =>
                                 (case !exe of
                                      NONE => exe := SOME (relify arg)