Система сборки Tup

Events from the world of KolibriOS and its developers
  • "Here is an obvious patch, ok for trunk?" - не надо так. Так будет зависимость образа от .revision, .revision обновляется при каждом коммите, так что образ будет пересобираться при каждом коммите, даже когда изменилось что-то, не входящее в образ.
    Сделаем мир лучше!
  • Hello,

    while dealing with fasm code in kolibri I'm always facing include directives like these.

    Code: Select all

    include '../../../../struct.inc'
    include '../../../../proc32.inc'
    include '../../../../macros.inc'
    include '../../../../config.inc'
    include '../../../../debug-fdo.inc'
    include '../../../../develop/libraries/libs-dev/libio/libio.inc'
    Or these.

    Code: Select all

    include '../../../../../../programs/proc32.inc'
    include '../../../../../../programs/macros.inc'
    include '../../../../../../programs/develop/libraries/box_lib/load_lib.mac'
    include '../../../../../../programs/dll.inc'
    I'm also tired of duplicate files like skin.inc (170 of them in svn) and once duplicate but now different files like proc32.inc (12 total, 6 different). Five years ago we had a similar issue with mem.inc and dll.inc files.

    Fortunately, recent versions of fasm (including the one on autobuild server) can look for include files into directories specified in an environment variable.
    fasm manual wrote:The file is first
    searched for in the directory containing file which included it and when it is
    not found there, the search is continued in the directories specified in the
    environment variable called INCLUDE (the multiple paths separated with
    semicolons can be defined there, they will be searched in the same order as
    specified).
    Pros:
    • You can use standard includes without duplicate files and without ../../../../ paths;
    • You can still copy standard includes into a program's dir if you checked out that single dir, and you don't have to edit include paths in source. I.e. you want to build inside kolibri to use debug info;
    • Thus no duplicates and ../../../../ paths;
    • As a bonus, it's possible to define lang variable inside use_fasm.lua via -d fasm option, then no 'echo lang fix en > lang.inc' is needed.
    Cons:
    • Those who don't use tup will have to set environment variables manually;
    • If we switch to fasm's -d option to specify language, non-tup users will have to type -dlang=en/ru manually.
    I attached a patch that adds use_fasm.lua file to /programs directory and updates /system/launch/Tupfile.lua as an example.
    I tested the patch on linux. If you like my idea and have windows, please, try it there (build launch app).
    Attachments
    use_fasm.diff (1.96 KiB)
    Downloaded 422 times
  • Hello.
    How I can setup autobuild for program? My problem: program use C_Layer. Folder C_Layer/OBJ is empty. But this objects need to compilation.
  • There are many examples in repository, read them.
    I committed Tupfile.lua for /contrib/C_Layer/ASM/* in #8265.
  • I set up autobuild to program use C_Layer, but: "loadlibimg.obj not recognized". Maybe kpack for objects broken them?
  • May be. You can set up tup autobuild locally as described in documentation and check it.
  • I just want to build kernel, how to exclude build DDK?
    to infinity and beyond
  • New tup 0.8 introduces backward-incompatible changes. If you set up the autobuild locally and it has stopped working recently, read this: https://gittup.org/tup/ex_explicit_variants.html

    punk_joker, you can build a single file via 'tup path/to/file'. You can also continue using plain fasm like 'fasm -m 262144 kernel.asm kernel.mnt'.
  • dunkaist wrote: Sat Apr 27, 2024 3:12 pm New tup 0.8 introduces backward-incompatible changes. If you set up the autobuild locally and it has stopped working recently, read this: https://gittup.org/tup/ex_explicit_variants.html

    punk_joker, you can build a single file via 'tup path/to/file'. You can also continue using plain fasm like 'fasm -m 262144 kernel.asm kernel.mnt'.
    Thanks. I will try to set up the KolibriOS build system tomorrow and test everything.
    to infinity and beyond
  • Who is online

    Users browsing this forum: No registered users and 0 guests