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:
Keywords: difficultyMedium, easyHack, skillCpp, topicCleanup
Depends on:
Blocks: Dev-related
  Show dependency treegraph
 
Reported: 2021-12-16 14:54 UTC by Hossein
Modified: 2022-01-07 13:00 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


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").