From: Bruno Haible Date: Sun, 12 Oct 2025 10:50:54 +0000 (+0200) Subject: build: Move more code into libgettextsrc. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5a0c27e5ab258b5cc02a1fc27350c4602dc1174b;p=thirdparty%2Fgettext.git build: Move more code into libgettextsrc. * gettext-tools/src/lang-table.h (language_table, language_table_size, language_variant_table, language_variant_table_size): Mark as LIBGETTEXTSRC_DLL_VARIABLE. * gettext-tools/src/Makefile.am (libgettextsrc_la_SOURCES): Add msgl-fsearch.c, lang-table.c, plural-count.c. (msgmerge_SOURCES): Remove msgl-fsearch.c, lang-table.c, plural-count.c. (msginit_SOURCES): Likewise. * gettext-tools/src/FILES: Update. --- diff --git a/gettext-tools/src/FILES b/gettext-tools/src/FILES index 54d6ecaf2..5d36b01c3 100644 --- a/gettext-tools/src/FILES +++ b/gettext-tools/src/FILES @@ -142,13 +142,18 @@ msgl-charset.h msgl-charset.c Checking the encoding of a list-of-messages. +plural-count.h +plural-count.c + Extracting the plural count of a header of a lists-of-messages. + +msgl-fsearch.h +msgl-fsearch.c + Fast fuzzy search among a list-of-messages. + +-------------- The 'msgmerge' program | msgl-equal.h | msgl-equal.c | Comparing two lists-of-messages. -| plural-count.h -| plural-count.c -| Extracting the plural count of a header of a lists-of-messages. | msgl-merge.h | msgl-merge.c | Merging a definitions file with a references file. diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am index 1bcebf691..380b52f3c 100644 --- a/gettext-tools/src/Makefile.am +++ b/gettext-tools/src/Makefile.am @@ -225,7 +225,8 @@ FORMAT_SOURCE += \ format-gcc-internal.c \ format-gfc-internal.c -# libgettextsrc contains all code that is needed by at least two programs. +# libgettextsrc contains all code that is needed by at least two programs +# and that does not use OpenMP. libgettextsrc_la_SOURCES = \ $(COMMON_SOURCE) \ read-catalog-special.c \ @@ -241,8 +242,11 @@ libgettextsrc_la_SOURCES = \ msgl-check.c \ file-list.c \ msgl-charset.c \ + msgl-fsearch.c \ + lang-table.c \ po-time.c \ plural-exp.c plural-eval.c plural-table.c \ + plural-count.c \ quote.h \ sentence.h sentence.c \ $(FORMAT_SOURCE) \ @@ -305,7 +309,7 @@ msgmerge_SOURCES = msgmerge.c else msgmerge_SOURCES = ../woe32dll/c++msgmerge.cc endif -msgmerge_SOURCES += msgl-fsearch.c msgl-merge.c lang-table.c plural-count.c +msgmerge_SOURCES += msgl-merge.c msgunfmt_SOURCES = msgunfmt.c msgunfmt_SOURCES += \ read-mo.c read-java.c read-csharp.c read-resources.c read-tcl.c \ @@ -397,7 +401,7 @@ else msggrep_SOURCES = ../woe32dll/c++msggrep.cc endif msginit_SOURCES = msginit.c -msginit_SOURCES += msgl-fsearch.c msgl-merge.c lang-table.c plural-count.c +msginit_SOURCES += msgl-merge.c msginit_SOURCES += ../../gettext-runtime/intl/localealias.c if !WOE32DLL msguniq_SOURCES = msguniq.c diff --git a/gettext-tools/src/lang-table.h b/gettext-tools/src/lang-table.h index ebf193b98..909b7bdd0 100644 --- a/gettext-tools/src/lang-table.h +++ b/gettext-tools/src/lang-table.h @@ -1,5 +1,5 @@ /* Table of languages. - Copyright (C) 2001-2007, 2019 Free Software Foundation, Inc. + Copyright (C) 2001-2025 Free Software Foundation, Inc. Written by Bruno Haible , 2005. This program is free software: you can redistribute it and/or modify @@ -32,11 +32,11 @@ struct language_table_entry const char *english; }; -extern struct language_table_entry language_table[]; -extern const size_t language_table_size; +extern LIBGETTEXTSRC_DLL_VARIABLE struct language_table_entry language_table[]; +extern LIBGETTEXTSRC_DLL_VARIABLE const size_t language_table_size; -extern struct language_table_entry language_variant_table[]; -extern const size_t language_variant_table_size; +extern LIBGETTEXTSRC_DLL_VARIABLE struct language_table_entry language_variant_table[]; +extern LIBGETTEXTSRC_DLL_VARIABLE const size_t language_variant_table_size; #ifdef __cplusplus