11 Commits
Author SHA1 Message Date
Caolán McNamara e75369aff8 use gperf -fpic friendly version mode
nm -S --size-sort --print-size instdir/program/libmergedlo.so| grep ' [Dd] ' | c++filt | tail -n 10

before:
... 00000000000027f0 d aFmFormShellSlots_Impl
... 0000000000002920 d pRGBTable
... 0000000000003b80 d vcl::pdf::BuildinFontFace::m_aBuildinFonts
... 0000000000004140 d C.16.0
... 0000000000004d80 d (anonymous namespace)::aMethods
... 00000000000066a8 d aRTFTokenTab
... 000000000000cf60 d xmloff::(anonymous namespace)::wordlist
... 000000000000cf60 d xmloff::token::getNames(int)::{lambda()#1}::operator()() const::sppcTokenNames
... 00000000000172c0 d oox::(anonymous namespace)::wordlist
... 00000000000172c0 d oox::TokenMap::getUtf8TokenName(int)::{lambda()#1}::operator()() const::sppcTokenNames

after:
... 0000000000002790 d STR_ARR_SVT_LANGUAGE_TABLE
... 00000000000027a8 d RID_STRLIST_FUNCTION_NAMES
... 00000000000027f0 d aFmFormShellSlots_Impl
... 0000000000002920 d pRGBTable
... 0000000000003b80 d vcl::pdf::BuildinFontFace::m_aBuildinFonts
... 0000000000004140 d C.16.0
... 0000000000004d80 d (anonymous namespace)::aMethods
... 00000000000066a8 d aRTFTokenTab
... 000000000000cf60 d xmloff::token::getNames(int)::{lambda()#1}::operator()() const::sppcTokenNames
... 00000000000172c0 d oox::TokenMap::getUtf8TokenName(int)::{lambda()#1}::operator()() const::sppcTokenNames

See also: https://www.akkadia.org/drepper/dsohowto.pdf

Change-Id: Ic1141c466d06d79d71e573c5f283cd1f089d7067
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187578
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-07-09 16:49:00 +02:00
Christian Lohmaier 0c4c84a14b makefile simplification: replace $(call gb_CustomTarget_get_workdir,foo)
…by a simple/static $(gb_CustomTarget_workdir)/foo

The build system has a lot of overly complicated leftovers from when it
was introduced and had not only deal with split repositories but also
had to coexist with another buildsystem. Along with lots of copy'n'paste
along the years the makefiles became hard to grasp for newcomers with
all our calls and evals.
As a first step to streamline that, the macros from TargetLocations that
simply prefix a static path to the argument (and similar of the same
kind) are a natural pick before simplifying the rules themselves/getting
rid of a bunch of eval statements.

Change-Id: Ia06dbbcd5d1994755a2ff05b84f72ccbc4e3cab5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167005
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-05-03 16:06:14 +02:00
Christian Lohmaier b87da3e940 run gperf via wsl in wsl-as-helper case
also split up the gperf commands when generating sw/generated/tokens.cxx

wsl has trouble appending using shell redirects, so use separate targets
and use cat in the final processing step for tokens.cxx
see also https://github.com/microsoft/WSL/issues/4400

Change-Id: Id7a24d060e9be71113ec2827a389d347456f6522
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166338
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
2024-04-26 14:01:51 +02:00
Christian Lohmaier f618f08cc3 simplify some sed rules/statements and use proper quoting
make removes partially built targets in case the rule exits with
non-zero status, so creating a temp file and moving it is not necessary
also use single quotes for cases where characters might be interpreted
by the shell
Also combine multiple sed calls into a single call of sed with multiple
expressions and replace additional "grep -v foo" with corresponding sed
delete command

Change-Id: Iff7e3b962175e347e5ed100a87c96fbaeef39985
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166410
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-04-26 14:01:19 +02:00
Stephan Bergmann d257314af2 Fix call of Python
...where $(PYTHON) is undefined, but which was mostly masked by
solenv/bin/gentoken.py happening to have a shebang line, except for flatpak
builds now failing with

> /usr/bin/env: ‘python’: No such file or directory
> make[1]: *** [/run/build/libreoffice/editeng/CustomTarget_generated.mk:18: /run/build/libreoffice/workdir/CustomTarget/editeng/generated/tokens.gperf] Error 127

(See also discussion in the comments of
<https://gerrit.libreoffice.org/c/core/+/89262> "Convert gentoken from Perl to
Python.")

Change-Id: Iebdf98d7b7ee4da9d861231064549ffef5445edc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89828
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-03 10:42:09 +01:00
Stephan Bergmann 45bd7006cc Missing dependency
(see <https://gerrit.libreoffice.org/c/core/+/89474/2#
message-df62334d1cd68aee22bbd7ee451bafba9bd62b72>)

Change-Id: I12d7bb4f0be102943e8c8dc204e517d045bc0d1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89837
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-03 07:35:58 +01:00
Jussi Pakkanen e6b9bc3f2e Convert gentoken from Perl to Python.
See tdf#130911 for motivation.

Change-Id: I62759a9c7766e5c62c6fbab06c15e8300df25935
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89262
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-02-25 08:33:07 +01:00
Stephan Bergmann f876fdd1c0 Check OS_FOR_BUILD for behavior of sed executed during build
Follow-up to d8106b6db4 "Non-standard sed -i
option is different on macOS than with GNU sed", thanks to mst for spotting it.

Change-Id: Ida51cfa7c4dd216a5164df4f8143ac89cf2c6b7f
Reviewed-on: https://gerrit.libreoffice.org/66498
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-17 13:20:24 +01:00
Stephan Bergmann d8106b6db4 Non-standard sed -i option is different on macOS than with GNU sed
While with GNU sed the optional backup suffix is given directly as part of the
-i[SUFFIX] (or --in-place[=SUFFIX]) argument, on macOS it must unconditionally
be given as a (potentially empty) argument following the -i argument.  That
means that on macOS the -e that happens to follow the -i in these sed
invocations (and that happens to not be necessary to introduce the following
script in these invocations) was mistaken as the backup suffix, causing creation
of pointless workdir/CustomTarget/*/generated/tokens.cxx-e backup files.

Change-Id: Icd865c76139afa348d03813eb83653afd7221a0e
Reviewed-on: https://gerrit.libreoffice.org/66491
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-17 09:55:05 +01:00
Daniel Sikeler e1cbf05c9d rename variables in makefile
Change-Id: Ie1a7a8d83cc9c1ae4b6d015b77713f446fdd871e
Reviewed-on: https://gerrit.libreoffice.org/12388
Reviewed-by: Matúš Kukan <matus.kukan@collabora.com>
Tested-by: Matúš Kukan <matus.kukan@collabora.com>
2014-11-12 15:31:36 +00:00
Daniel Sikeler 2b442c1df4 fdo#80403: TokenHandler impl. FastTokenHandlerBase
getTokenFromUTF8: calls getTokenDirect
getTokenDirect: uses perfect hash

New makefile creates perfect hash table with perl-script gentoken.pl.
I found the script on https://wiki.openoffice.org/wiki/XFastTokenHandler and made some changes.
XMLTokens are defined in tokens.txt

Change-Id: Id04134a896ee082e2d0ba55a715fede19ff04928
Reviewed-on: https://gerrit.libreoffice.org/12335
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2014-11-11 09:36:52 +00:00