Changes between Initial Version and Version 2 of Ticket #518


Ignore:
Timestamp:
2013-03-28T17:58:27Z (11 years ago)
Author:
Martin Decky
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #518

    • Property Component helenos/unspecifiedhelenos-build
    • Property Owner set to Martin Decky
  • Ticket #518 – Description

    initial v2  
    22
    33 Details::
    4  The build process of HelenOS is currently controlled by make. The build system works well but there is space for improvement that is not possible with Makefiles. The task is to convert currently existing Makefiles into Waf scripts.
    5  [[br]][[br]]
    6  Compiling an operating system usually requires a non-trivial build scripts and, unfortunately, HelenOS is not an exception. Thus, the conversion would not be a trivial search-and-replace exercise. HelenOS has a lot of configuration options that are reflected in the build scripts where they control what has to be build and how. All this would have to be converted and for many of the tasks there are not built-in equivalents in Waf: new tasks would have to be defined and probably a lot of existing ones would have to be changed.
    7  [[br]][[br]]
    8  The effort to switch to Waf started about a year ago but due to lack of time was abandoned. It is possible to get inspiration from the obsolete branch located at [https://code.launchpad.net/~vojtech-horky/helenos/waf lp:~vojtech-horky/helenos/waf].
    9  [[br]][[br]]
    10  There are a lot of helper tools that are used during the build process and most of them are written in Python. Some changes to them might be necessary as well to better integrate them with Waf.
     4  The build process of HelenOS is currently controlled by make. The build system works well but there is space for improvement that is not possible with Makefiles. The task is to convert currently existing Makefiles into Waf scripts.
     5  [[br]][[br]]
     6  Compiling an operating system usually requires a non-trivial build scripts and, unfortunately, HelenOS is not an exception. Thus, the conversion would not be a trivial search-and-replace exercise. HelenOS has a lot of configuration options that are reflected in the build scripts where they control what has to be build and how. All this would have to be converted and for many of the tasks there are not built-in equivalents in Waf: new tasks would have to be defined and probably a lot of existing ones would have to be changed.
     7  [[br]][[br]]
     8  The effort to switch to Waf started about a year ago but due to lack of time was abandoned. It is possible to get inspiration from the obsolete branch located at [https://code.launchpad.net/~vojtech-horky/helenos/waf lp:~vojtech-horky/helenos/waf].
     9  [[br]][[br]]
     10  There are a lot of helper tools that are used during the build process and most of them are written in Python. Some changes to them might be necessary as well to better integrate them with Waf.
    1111
    1212 What Gains and Benefits will this bring?::
    13  Although it is possible to '''build out of the source''' tree with make, it would require extensive patching of the current Makefiles. Waf offers this automatically. Furthermore, it shall be possible to have different build configurations at the same time in the same source tree. That would allow to incrementally build for different architectures at the same time. This would significantly reduce the time needed to check whether the functionality works okay across different platforms.
    14  [[br]][[br]]
    15  Make supports '''parallel build''' but this does not work well across directories while Waf has a "global" knowledge of what has to be build and shall provide better parallelization (more evenly balanced).
    16  [[br]][[br]]
    17  Specifying '''which library to link the application with''' currently means adding both compiler and linker flags to the respective Makefile. With Waf it is possible to specify exported headers for each library and then reference them just by library name. That would simplify writing the application scripts and would also make them more robust.
    18  [[br]][[br]]
    19  Waf scripts are actually snippets of Python code which could be useful in some special situation where writing the logic in an '''imperative language''' simply makes more sense.
    20  [[br]][[br]]
    21  Last year(s) a lot of effort was invested into making HelenOS '''self-hosting'''. Porting Python is a necessary prerequisite because of the tools used during the build. Having also the build process controlled by a Python script would reduce the number of other applications that would have to be ported (namely Unix shell, make and makedepend).
     13  Although it is possible to '''build out of the source''' tree with make, it would require extensive patching of the current Makefiles. Waf offers this automatically. Furthermore, it shall be possible to have different build configurations at the same time in the same source tree. That would allow to incrementally build for different architectures at the same time. This would significantly reduce the time needed to check whether the functionality works okay across different platforms.
     14  [[br]][[br]]
     15  Make supports '''parallel build''' but this does not work well across directories while Waf has a "global" knowledge of what has to be build and shall provide better parallelization (more evenly balanced).
     16  [[br]][[br]]
     17  Specifying '''which library to link the application with''' currently means adding both compiler and linker flags to the respective Makefile. With Waf it is possible to specify exported headers for each library and then reference them just by library name. That would simplify writing the application scripts and would also make them more robust.
     18  [[br]][[br]]
     19  Waf scripts are actually snippets of Python code which could be useful in some special situation where writing the logic in an '''imperative language''' simply makes more sense.
     20  [[br]][[br]]
     21  Last year(s) a lot of effort was invested into making HelenOS '''self-hosting'''. Porting Python is a necessary prerequisite because of the tools used during the build. Having also the build process controlled by a Python script would reduce the number of other applications that would have to be ported (namely Unix shell, make and makedepend).
    2222
    2323 Difficulty::
    24  easy to medium
     24  Easy to Medium
    2525
    2626 Required skills::
    27  A successful applicant will have good skills of programming in the Python language and good understanding of the compile/link process used when building C programs. Good knowledge of make and related tools is necessary. Prior knowledge of Waf is clearly an advantage.
     27  A successful applicant will have good skills of programming in the Python language and good understanding of the compile/link process used when building C programs. Good knowledge of make and related tools is necessary. Prior knowledge of Waf is clearly an advantage.
    2828
    2929 Documentation::
     
    3333
    3434 Possible mentors::
    35  HelenOS Core Team, Vojtech Horky
     35  HelenOS Core Team, Vojtech Horky