mirror of
https://github.com/elua/elua.git
synced 2025-01-25 01:02:54 +08:00
It is now possible to configure each individual command that will be compiled in the shell: ``` shell = { commands = {'ls', 'ver', 'type' } } ``` If not specified, all the available commands will be compiled (which is backwards compatible). Also, the `advanced_shell` attribute is gone, replaced with an `advanced` key in the shell configuration. So write this: ``` shell = { advanced = true } ``` instead of this: ``` advanced_shell = true ```
32 lines
1.0 KiB
Lua
32 lines
1.0 KiB
Lua
package.path = package.path .. ";../utils/?.lua"
|
|
local utils = require "utils.utils"
|
|
local sf = string.format
|
|
|
|
-- List of platforms to build
|
|
local ci_boards = {"ek-lm3s8962", "elua-puc", "mbed", "arm2368", "stm32f4discovery"}
|
|
|
|
-- Variants to build for each platform
|
|
-- TODO: is "lualong" also needed here?
|
|
local build_variants = {"lua", "lualonglong"}
|
|
|
|
-- Run a single build command
|
|
local function build_single(header, cmd)
|
|
if header then print(utils.col_magenta(sf(">>>>>>>> %s", header))) end
|
|
print(utils.col_magenta(sf(">>>>>>>> Command: %s", cmd)))
|
|
local res = os.execute(cmd)
|
|
if res ~= 0 then os.exit(res) end
|
|
end
|
|
|
|
-- Build the cross-compiler first
|
|
build_single("Building cross-compiler", "lua cross-lua.lua")
|
|
|
|
-- Then the actual targets
|
|
for _, board in pairs(ci_boards) do
|
|
for _, variant in pairs(build_variants) do
|
|
local header = sf("Building eLua for %s (%s)", board, variant)
|
|
local cmd = sf("lua build_elua.lua board=%s target=%s", board, variant)
|
|
build_single(header, cmd)
|
|
end
|
|
end
|
|
|