kolibrios/programs/system/docpack/trunk/Tupfile.lua
Ivan Baravy e9e08c56b6 Update Tupfile.lua's for tup-0.8
git-svn-id: svn://kolibrios.org@10042 a494cfbc-eb01-0410-851d-a64ba20cac60
2024-05-21 14:45:21 +00:00

25 lines
1.2 KiB
Lua

if tup.getconfig("NO_FASM") ~= "" or tup.getconfig("BUILD_TYPE") == "" then return end
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
tup.include(HELPERDIR .. "/use_fasm.lua")
add_include(tup.getvariantdir())
deps = tup.rule("echo lang fix " .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. " > %o", {"lang.inc"})
DOCDIR = "../../../../data/" .. tup.getconfig("BUILD_TYPE") .. "/docs/"
if tup.getconfig("TUP_PLATFORM") == "win32"
then env_prefix = "set DOCDIR=$(DOCDIR)&&"; cp_cmd = "copy %f %o"
else env_prefix = "DOCDIR=$(DOCDIR) "; cp_cmd = "cp %f %o"
end
if tup.getconfig("LANG") == "ru"
then tup.append_table(deps,
tup.rule("../../../../kernel/trunk/docs/sysfuncr.txt", "iconv -f utf-8 -t cp866 %f > %o", "SYSFUNCR.TXT"))
else tup.append_table(deps,
tup.rule("../../../../kernel/trunk/docs/sysfuncs.txt", cp_cmd, "SYSFUNCS.TXT"))
end
tup.append_table(deps,
tup.rule("../../../develop/fasm/1.73/fasm.txt", cp_cmd, "FASM.TXT")
)
tup.append_table(deps,
tup.rule("../../../../kernel/trunk/docs/stack.txt", cp_cmd, "STACK.TXT")
)
tup.rule({"docpack.asm", extra_inputs = deps}, env_prefix .. FASM .. " %f %o " .. tup.getconfig("KPACK_CMD"), "docpack")