mirror of
https://github.com/natnat-mc/moonbuild
synced 2026-05-28 04:59:41 +02:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 77f73f3a21 | |||
| 31fcc58ccd | |||
| fcf7c3fa07 | |||
| 88a8117f06 | |||
| 69e781bc8f | |||
| ee0d76db98 | |||
| 6a6334fc78 | |||
| e5bd85933a |
@@ -12,6 +12,8 @@ nodepriority = (a, b) ->
|
||||
tb = type b.name
|
||||
da = #a.deps
|
||||
db = #b.deps
|
||||
sa = a.sync
|
||||
sb = b.sync
|
||||
if ta=='string' and tb!='string'
|
||||
return true
|
||||
elseif ta!='string' and tb=='string'
|
||||
@@ -20,6 +22,10 @@ nodepriority = (a, b) ->
|
||||
return true
|
||||
elseif a.priority < b.priority
|
||||
return false
|
||||
elseif sa and not sb
|
||||
return false
|
||||
elseif sb and not sa
|
||||
return true
|
||||
else
|
||||
return da < db
|
||||
|
||||
@@ -28,6 +34,7 @@ transclosure = (obj, prop) ->
|
||||
i = 1
|
||||
set = {}
|
||||
imp = (e) ->
|
||||
return unless e[prop]
|
||||
for v in *e[prop]
|
||||
if not set[v]
|
||||
elems[i], i = v, i+1
|
||||
@@ -116,7 +123,7 @@ class DepNode
|
||||
return false
|
||||
for file in *@ins
|
||||
if not exists file
|
||||
error "Node #{name} has ran all of its parents, but can't run since #{file} doesn't exist"
|
||||
error "Node #{@name} has ran all of its parents, but can't run since #{file} doesn't exist. Did you mean to use after instead of depends?"
|
||||
return true
|
||||
|
||||
build: (opts={}) =>
|
||||
|
||||
@@ -37,6 +37,14 @@ class Executor
|
||||
error "Node #{name} wasn't built" unless node.built
|
||||
|
||||
addprocess: (node, opts) =>
|
||||
if node.sync
|
||||
while @nprocesses != 0
|
||||
@waitprocess!
|
||||
node\build opts
|
||||
node.built = true
|
||||
node\updatecache!
|
||||
return
|
||||
|
||||
pid = fork!
|
||||
error "Failed to fork" unless pid
|
||||
if pid!=0
|
||||
|
||||
+19
-1
@@ -1670,6 +1670,8 @@ nodepriority = function(a, b)
|
||||
local tb = type(b.name)
|
||||
local da = #a.deps
|
||||
local db = #b.deps
|
||||
local sa = a.sync
|
||||
local sb = b.sync
|
||||
if ta == 'string' and tb ~= 'string' then
|
||||
return true
|
||||
elseif ta ~= 'string' and tb == 'string' then
|
||||
@@ -1678,6 +1680,10 @@ nodepriority = function(a, b)
|
||||
return true
|
||||
elseif a.priority < b.priority then
|
||||
return false
|
||||
elseif sa and not sb then
|
||||
return false
|
||||
elseif sb and not sa then
|
||||
return true
|
||||
else
|
||||
return da < db
|
||||
end
|
||||
@@ -1689,6 +1695,9 @@ transclosure = function(obj, prop)
|
||||
local set = { }
|
||||
local imp
|
||||
imp = function(e)
|
||||
if not (e[prop]) then
|
||||
return
|
||||
end
|
||||
local _list_0 = e[prop]
|
||||
for _index_0 = 1, #_list_0 do
|
||||
local v = _list_0[_index_0]
|
||||
@@ -1812,7 +1821,7 @@ do
|
||||
for _index_0 = 1, #_list_1 do
|
||||
local file = _list_1[_index_0]
|
||||
if not exists(file) then
|
||||
error("Node " .. tostring(name) .. " has ran all of its parents, but can't run since " .. tostring(file) .. " doesn't exist")
|
||||
error("Node " .. tostring(self.name) .. " has ran all of its parents, but can't run since " .. tostring(file) .. " doesn't exist. Did you mean to use after instead of depends?")
|
||||
end
|
||||
end
|
||||
return true
|
||||
@@ -2248,6 +2257,15 @@ do
|
||||
end
|
||||
end,
|
||||
addprocess = function(self, node, opts)
|
||||
if node.sync then
|
||||
while self.nprocesses ~= 0 do
|
||||
self:waitprocess()
|
||||
end
|
||||
node:build(opts)
|
||||
node.built = true
|
||||
node:updatecache()
|
||||
return
|
||||
end
|
||||
local pid = fork()
|
||||
if not (pid) then
|
||||
error("Failed to fork")
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
build = {
|
||||
install = {
|
||||
bin = {
|
||||
moonbuild = "out/moonbuild"
|
||||
}
|
||||
},
|
||||
type = "builtin"
|
||||
}
|
||||
dependencies = {
|
||||
"lua >= 5.1",
|
||||
"argparse >= 0.7.1-1",
|
||||
"moonscript >= 0.5.0-1"
|
||||
}
|
||||
description = {
|
||||
detailed = "moonbuild is a small build system that simplifies your build definitions by allowing you to use declarative as well as imperative rules. It represents the build as a DAG with explicit ordering, and doesn't give you any default confusing rules (unlike make). If you can, installing luaposix and/or luafilesystem will speed up builds and increase stability.\n",
|
||||
summary = "Small build system in between make and a build.sh"
|
||||
}
|
||||
package = "moonbuild"
|
||||
rockspec_format = "3.0"
|
||||
source = {
|
||||
tag = "v2.1.0",
|
||||
url = "git://github.com/natnat-mc/moonbuild"
|
||||
}
|
||||
version = "2.1.0-3"
|
||||
@@ -0,0 +1,24 @@
|
||||
build = {
|
||||
install = {
|
||||
bin = {
|
||||
moonbuild = "out/moonbuild"
|
||||
}
|
||||
},
|
||||
type = "builtin"
|
||||
}
|
||||
dependencies = {
|
||||
"lua >= 5.1",
|
||||
"argparse >= 0.7.1-1",
|
||||
"moonscript >= 0.5.0-1"
|
||||
}
|
||||
description = {
|
||||
detailed = "moonbuild is a small build system that simplifies your build definitions by allowing you to use declarative as well as imperative rules. It represents the build as a DAG with explicit ordering, and doesn't give you any default confusing rules (unlike make). If you can, installing luaposix and/or luafilesystem will speed up builds and increase stability.\n",
|
||||
summary = "Small build system in between make and a build.sh"
|
||||
}
|
||||
package = "moonbuild"
|
||||
rockspec_format = "3.0"
|
||||
source = {
|
||||
tag = "v2.1.1",
|
||||
url = "git://github.com/natnat-mc/moonbuild"
|
||||
}
|
||||
version = "2.1.1-1"
|
||||
@@ -0,0 +1,24 @@
|
||||
build = {
|
||||
install = {
|
||||
bin = {
|
||||
moonbuild = "out/moonbuild"
|
||||
}
|
||||
},
|
||||
type = "builtin"
|
||||
}
|
||||
dependencies = {
|
||||
"lua >= 5.1",
|
||||
"argparse >= 0.7.1-1",
|
||||
"moonscript >= 0.5.0-1"
|
||||
}
|
||||
description = {
|
||||
detailed = "moonbuild is a small build system that simplifies your build definitions by allowing you to use declarative as well as imperative rules. It represents the build as a DAG with explicit ordering, and doesn't give you any default confusing rules (unlike make). If you can, installing luaposix and/or luafilesystem will speed up builds and increase stability.\n",
|
||||
summary = "Small build system in between make and a build.sh"
|
||||
}
|
||||
package = "moonbuild"
|
||||
rockspec_format = "3.0"
|
||||
source = {
|
||||
tag = "v2.1.2",
|
||||
url = "git://github.com/natnat-mc/moonbuild"
|
||||
}
|
||||
version = "2.1.2-1"
|
||||
@@ -0,0 +1,24 @@
|
||||
build = {
|
||||
install = {
|
||||
bin = {
|
||||
moonbuild = "out/moonbuild"
|
||||
}
|
||||
},
|
||||
type = "builtin"
|
||||
}
|
||||
dependencies = {
|
||||
"lua >= 5.1",
|
||||
"argparse >= 0.7.1-1",
|
||||
"moonscript >= 0.5.0-1"
|
||||
}
|
||||
description = {
|
||||
detailed = "moonbuild is a small build system that simplifies your build definitions by allowing you to use declarative as well as imperative rules. It represents the build as a DAG with explicit ordering, and doesn't give you any default confusing rules (unlike make). If you can, installing luaposix and/or luafilesystem will speed up builds and increase stability.\n",
|
||||
summary = "Small build system in between make and a build.sh"
|
||||
}
|
||||
package = "moonbuild"
|
||||
rockspec_format = "3.0"
|
||||
source = {
|
||||
tag = "v2.1.2",
|
||||
url = "git://github.com/natnat-mc/moonbuild"
|
||||
}
|
||||
version = "2.1.2-2"
|
||||
@@ -0,0 +1,24 @@
|
||||
build = {
|
||||
install = {
|
||||
bin = {
|
||||
moonbuild = "out/moonbuild"
|
||||
}
|
||||
},
|
||||
type = "builtin"
|
||||
}
|
||||
dependencies = {
|
||||
"lua >= 5.1",
|
||||
"argparse >= 0.7.1-1",
|
||||
"moonscript >= 0.5.0-1"
|
||||
}
|
||||
description = {
|
||||
detailed = "moonbuild is a small build system that simplifies your build definitions by allowing you to use declarative as well as imperative rules. It represents the build as a DAG with explicit ordering, and doesn't give you any default confusing rules (unlike make). If you can, installing luaposix and/or luafilesystem will speed up builds and increase stability.\n",
|
||||
summary = "Small build system in between make and a build.sh"
|
||||
}
|
||||
package = "moonbuild"
|
||||
rockspec_format = "3.0"
|
||||
source = {
|
||||
tag = "v2.1.3",
|
||||
url = "git://github.com/natnat-mc/moonbuild"
|
||||
}
|
||||
version = "2.1.3-1"
|
||||
Reference in New Issue
Block a user