ref: 3456a5b71887bb64aa8eac957a287a78b8ce9f28
parent: a01eddc70c617c44a88e42813647275947907798
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Mar 8 21:10:58 EDT 2015
Update to new usefile format, with versioning.
--- a/build.myr
+++ b/build.myr
@@ -397,7 +397,7 @@
;;
std.slfree(lib)
| `std.None:
- std.fatal(1, "could not find library lib%s.a", l)
+ std.fatal(1, "%s: could not find library lib%s.a", l)
;;
;;
std.slfree(libs)
--- a/deps.myr
+++ b/deps.myr
@@ -214,6 +214,11 @@
| `std.Some _: std.fatal(1, "library %s: corrupt or invalid usefile\n", lib)
| `std.None: std.fatal(1, "library %s: could not read usefile\n", lib)
;;
+ match bio.getbe32(f)
+ | `std.None: std.fatal(1, "library %s: corrutpt or invalid usefile\n", lib)
+ | `std.Some 0: /* nothing: version matches. */
+ | `std.Some _: std.fatal(1, "library %s: usefile version unknown\n", lib)
+ ;;
std.slfree(rdstr(f))
done = false
while !done