Bug 146266 - Move test/demo/workbench from the old build system to the new gbuild system
Summary: Move test/demo/workbench from the old build system to the new gbuild system
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: reviewed:2023 target:24.8.0
Keywords: difficultyMedium, easyHack, skillCpp, topicCleanup
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2021-12-16 14:54 UTC by Hossein
Modified: 2024-04-12 14:51 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hossein 2021-12-16 14:54:44 UTC
Several years ago, the old LibreOffice build system is migrated to the new gbuild system. But, there are still few instances of the old build system remaining. If you look for makefile.mk inside the LibreOffice core source, you will find them:

    find -name makefile.mk

https://opengrok.libreoffice.org/search?project=core&path=makefile.mk

Each of the remaining sub-projects that still use the old build system are a kind of test, demo or workbench. The task here is to use the new build system for each one of the remaining stuff.

You should determine what to do with the old stuff:

1) If it is a test, the best option would be to convert it to an automated test, preferably using cppunit.
https://wiki.documentfoundation.org/QA/Testing/Automated_Tests
https://wiki.documentfoundation.org/Cppunit

2) If it is a demo, or a workben(ch) that have a main() inside it, you can rewrite the makefile to use the new build system. You should take a look at the examples like vcldemo, mtfdemo, etc. There is a little chance that the result works out of the box, and you may have to overhaul the cpp files in order to be able to build and run it successfully. The result is expected to be run like mtfdemo and similar examples.

    /bin/run mtfdemo
Comment 1 Kevin Suo 2021-12-17 14:31:45 UTC
Set to NEW as this is an easyhack.
Comment 2 Jan-Marek Glogowski 2022-01-07 13:00:32 UTC
It's normally much easier to just convert a demo or workbench program to gbuild. In fact, most old tests are no easy hacks, IMHO. You must convert a test, understand them and eventually evaluate the result. Some might require additional setup in gbuild.

So I suggest to stick with workbench and demo programs. The gbuild conversion is most times straight-forward and then you normally must just fix compiler warnings.

One of the later conversions can be seen in commit a4749a48677b26c8b9ba9cf36f5c9bf62ed9ed8a ("Convert canvasdemo to gbuild").
Comment 3 Hossein 2023-03-02 14:56:45 UTC
Re-evaluating the EasyHack in 2023

This issue is still relevant, as there are unconverted test/demo/workbenches still there.
Comment 4 khandelwalarvind26 2023-03-08 14:04:21 UTC
(In reply to Hossein from comment #3)
> Re-evaluating the EasyHack in 2023
> 
> This issue is still relevant, as there are unconverted test/demo/workbenches
> still there.

Hey, was working on this issue but a little confused about the new gbuild system. I know the basics of makefile. Can you provide any docs I can refer to, to learn about this? Thanks.
Comment 5 Buovjaga 2023-03-08 14:09:56 UTC
(In reply to khandelwalarvind26 from comment #4)
> (In reply to Hossein from comment #3)
> > Re-evaluating the EasyHack in 2023
> > 
> > This issue is still relevant, as there are unconverted test/demo/workbenches
> > still there.
> 
> Hey, was working on this issue but a little confused about the new gbuild
> system. I know the basics of makefile. Can you provide any docs I can refer
> to, to learn about this? Thanks.

https://dev.blog.documentfoundation.org/2022/12/03/gbuild-libreoffice-build-system-part-1/
Comment 6 Commit Notification 2024-04-12 14:51:04 UTC
RMZeroFour committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/804caab067acaedca85abb9e83170e1a3f01b185

tdf#146266 Move WeakBag test to gbuild system

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.