mirror of
https://github.com/natnat-mc/moonbuild
synced 2026-05-28 21:09:40 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ee0d76db98 | |||
| 6a6334fc78 | |||
| e5bd85933a |
@@ -12,6 +12,8 @@ nodepriority = (a, b) ->
|
|||||||
tb = type b.name
|
tb = type b.name
|
||||||
da = #a.deps
|
da = #a.deps
|
||||||
db = #b.deps
|
db = #b.deps
|
||||||
|
sa = a.sync
|
||||||
|
sb = b.sync
|
||||||
if ta=='string' and tb!='string'
|
if ta=='string' and tb!='string'
|
||||||
return true
|
return true
|
||||||
elseif ta!='string' and tb=='string'
|
elseif ta!='string' and tb=='string'
|
||||||
@@ -20,6 +22,10 @@ nodepriority = (a, b) ->
|
|||||||
return true
|
return true
|
||||||
elseif a.priority < b.priority
|
elseif a.priority < b.priority
|
||||||
return false
|
return false
|
||||||
|
elseif sa and not sb
|
||||||
|
return false
|
||||||
|
elseif sb and not sa
|
||||||
|
return true
|
||||||
else
|
else
|
||||||
return da < db
|
return da < db
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,14 @@ class Executor
|
|||||||
error "Node #{name} wasn't built" unless node.built
|
error "Node #{name} wasn't built" unless node.built
|
||||||
|
|
||||||
addprocess: (node, opts) =>
|
addprocess: (node, opts) =>
|
||||||
|
if node.sync
|
||||||
|
while @nprocesses != 0
|
||||||
|
@waitprocess
|
||||||
|
node\build opts
|
||||||
|
node.built = true
|
||||||
|
node\updatecache!
|
||||||
|
return
|
||||||
|
|
||||||
pid = fork!
|
pid = fork!
|
||||||
error "Failed to fork" unless pid
|
error "Failed to fork" unless pid
|
||||||
if pid!=0
|
if pid!=0
|
||||||
|
|||||||
@@ -1670,6 +1670,8 @@ nodepriority = function(a, b)
|
|||||||
local tb = type(b.name)
|
local tb = type(b.name)
|
||||||
local da = #a.deps
|
local da = #a.deps
|
||||||
local db = #b.deps
|
local db = #b.deps
|
||||||
|
local sa = a.sync
|
||||||
|
local sb = b.sync
|
||||||
if ta == 'string' and tb ~= 'string' then
|
if ta == 'string' and tb ~= 'string' then
|
||||||
return true
|
return true
|
||||||
elseif ta ~= 'string' and tb == 'string' then
|
elseif ta ~= 'string' and tb == 'string' then
|
||||||
@@ -1678,6 +1680,10 @@ nodepriority = function(a, b)
|
|||||||
return true
|
return true
|
||||||
elseif a.priority < b.priority then
|
elseif a.priority < b.priority then
|
||||||
return false
|
return false
|
||||||
|
elseif sa and not sb then
|
||||||
|
return false
|
||||||
|
elseif sb and not sa then
|
||||||
|
return true
|
||||||
else
|
else
|
||||||
return da < db
|
return da < db
|
||||||
end
|
end
|
||||||
@@ -2248,6 +2254,15 @@ do
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
addprocess = function(self, node, opts)
|
addprocess = function(self, node, opts)
|
||||||
|
if node.sync then
|
||||||
|
while self.nprocesses ~= 0 do
|
||||||
|
local _ = self.waitprocess
|
||||||
|
end
|
||||||
|
node:build(opts)
|
||||||
|
node.built = true
|
||||||
|
node:updatecache()
|
||||||
|
return
|
||||||
|
end
|
||||||
local pid = fork()
|
local pid = fork()
|
||||||
if not (pid) then
|
if not (pid) then
|
||||||
error("Failed to fork")
|
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"
|
||||||
Reference in New Issue
Block a user