ref: 80a7f99fbf48e104202f47b3e7685804282737c1
parent: f5761a93a98d27b6f05a31f4bdc3338ae244c86c
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Sep 24 12:43:45 EDT 2014
Build fresh things transitively.
--- a/build.myr
+++ b/build.myr
@@ -122,15 +122,21 @@
}
const builddep = {dg, dep, out
+ var freshdep
+
+ freshdep = true
match std.htget(dg.deps, dep)
| `std.Some deps:
for d in deps
builddep(dg, d, dep)
+ if !isfresh(d, out)
+ freshdep = false
+ ;;
;;
| `std.None:
;;
- if isfresh(dep, out)
+ if freshdep && isfresh(dep, out)
-> false
;;
if std.hassuffix(dep, ".myr")
@@ -183,13 +189,11 @@
;;
cmd = std.slpush(cmd, std.fmt("-L%s%s", opt_instroot, "/lib/myr"))
- /*
/* special for OSX: it warns if we don't add this */
- if std.sleq(opt_sysname, "Darwin")
- cmd = std.slpush(cmd, std.sldup("-macosx_version_min"))
- cmd = std.slpush(cmd, std.sldup("10.6"))
+ if std.sleq(opt_sys, "osx")
+ cmd = std.slpush(cmd, std.sldup("-macosx_version_min"))
+ cmd = std.slpush(cmd, std.sldup("10.6"))
;;
- */
run(cmd)
strlistfree(cmd)
@@ -260,9 +264,9 @@
-> false
;;
if srcsb.mtime.sec != dstsb.mtime.sec
- -> srcsb.mtime.sec <= dstsb.mtime.sec
+ -> srcsb.mtime.sec < dstsb.mtime.sec
else
- -> srcsb.mtime.nsec <= dstsb.mtime.nsec
+ -> srcsb.mtime.nsec < dstsb.mtime.nsec
;;
}
--- a/types.myr
+++ b/types.myr
@@ -19,6 +19,7 @@
roots : byte[:][:]
deps : std.htab(byte[:], byte[:][:])#
libs : std.htab(byte[:], byte[:][:])#
+ updated : std.htab(byte[:], bool)#
;;
type myrtarg = struct