The rule to add an executable or shared library to the Haiku image
automatically also includes the corresponding locale catalogs and MIME
database entries.
The locale catalogs for .a files linked in the executable are also
included, since .a files are not themselves added to the same package.
This makes sure the executable has all the catalogs it needs.
The jam rule was written assuming that NEEDLIBS would only contain .a
files, but that is not the case when compiling Haiku. Libroot for
example is also in NEEDLIBS (this makes sure it is linked by absolute
file path, whereas LINKLIBS would instead use -lroot and may link the
host system one).
Rewrite the rule to include catalogs from the selected target and only
its .a dependencies.
Fixes#19721.
Change-Id: I0315476030d2e6e4dea574bb5f254ce9b442f556
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10563
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>