fix(build): po2lmo собирается через Makefile luci

Upstream openwrt/luci убрал template_lmo.c из дерева: po2lmo теперь
линкуется с src/lib/lmo и генерируемым lemon plural_formula, поэтому
прямой вызов gcc больше не работает - только in-tree Makefile.
Проверка наличия template_lmo.c заменена на сборку make po2lmo,
проверено на свежем клоне master.
This commit is contained in:
Dushnilin
2026-08-21 21:41:23 +03:00
parent f29db7d5a3
commit c910e6368e
+5 -4
View File
@@ -217,15 +217,16 @@ ensure_po2lmo() {
fi
)
if [[ ! -f "$luci_src_dir/template_lmo.c" || ! -f "$luci_src_dir/po2lmo.c" ]]; then
if [[ ! -f "$luci_src_dir/po2lmo.c" ]]; then
echo "po2lmo sources unavailable under $luci_src_dir" >&2
return 1
fi
if [[ ! -x "$luci_src_dir/po2lmo" ]]; then
gcc -O2 -o "$luci_src_dir/po2lmo" "$luci_src_dir/po2lmo.c" "$luci_src_dir/template_lmo.c" >&2 \
|| make -C "$luci_src_dir" po2lmo >&2 \
|| true
# Upstream luci dropped template_lmo.c from the tree: po2lmo now links
# against src/lib/lmo and a lemon-generated plural_formula, so only the
# in-tree Makefile knows how to build it.
make -C "$luci_src_dir" po2lmo >&2 || true
fi
if [[ -x "$luci_src_dir/po2lmo" ]]; then