author | wenzelm |
Thu, 30 Aug 2007 17:09:02 +0200 | |
changeset 24489 | d4967d2188d6 |
parent 23207 | 769f7762f531 |
child 24611 | 1f92518fbabe |
permissions | -rw-r--r-- |
23207 | 1 |
(* Title: Admin/isatest/annomaly.ML |
2 |
ID: $Id$ |
|
3 |
Author: Martin von Gagern <martin@von-gagern.net> |
|
4 |
*) |
|
5 |
||
6 |
use "ML-Systems/smlnj.ML"; |
|
22488
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
7 |
|
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
8 |
local |
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
9 |
|
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
10 |
val smlnj_use_text = use_text |
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
11 |
|
22489
52a5277d0489
Better documentation path rewriting for src dir, used in tarball build.
gagern
parents:
22488
diff
changeset
|
12 |
fun strip ([], "src" :: name, _) = name |
22488
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
13 |
| strip (["Distribution"], name, _) = name |
22489
52a5277d0489
Better documentation path rewriting for src dir, used in tarball build.
gagern
parents:
22488
diff
changeset
|
14 |
| strip ([], name, _) = name |
22488
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
15 |
| strip (h1 :: t1, h2 :: t2, def) = |
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
16 |
if h1 = h2 then strip (t1, t2, def) else def |
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
17 |
|
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
18 |
fun rewrite (NONE, name) = "use_text" :: name |
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
19 |
| rewrite (SOME home, name) = |
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
20 |
strip (#arcs (OS.Path.fromString home), name, "use_text" :: name) |
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
21 |
|
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
22 |
in |
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
23 |
|
23207 | 24 |
fun use_text name p v t = |
25 |
let val name = case name of "" => "unnamed" | name => name |
|
26 |
val arcs = rewrite (OS.Process.getEnv "ISABELLE_HOME", |
|
27 |
#arcs (OS.Path.fromString name)) |
|
28 |
val _ = AnnoMaLy.nameNextStream ("isabelle" :: arcs) |
|
29 |
in smlnj_use_text name p v t end |
|
22488
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
30 |
|
415098eece94
Changed AnnoMaLy build process from CVS to tarball sources.
gagern
parents:
diff
changeset
|
31 |
end; |