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:
@@ -217,15 +217,16 @@ ensure_po2lmo() {
|
|||||||
fi
|
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
|
echo "po2lmo sources unavailable under $luci_src_dir" >&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -x "$luci_src_dir/po2lmo" ]]; then
|
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 \
|
# Upstream luci dropped template_lmo.c from the tree: po2lmo now links
|
||||||
|| make -C "$luci_src_dir" po2lmo >&2 \
|
# against src/lib/lmo and a lemon-generated plural_formula, so only the
|
||||||
|| true
|
# in-tree Makefile knows how to build it.
|
||||||
|
make -C "$luci_src_dir" po2lmo >&2 || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -x "$luci_src_dir/po2lmo" ]]; then
|
if [[ -x "$luci_src_dir/po2lmo" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user