commit: c8881b03457573b34c00ea8041b197241dda5c0b
parent c1e09df4bda8fa4752e4cbd54474594eda7bcf88
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Tue, 10 Oct 2023 17:25:53 +0200
configure: Simplify missing ed handling
Diffstat:
2 files changed, 7 insertions(+), 18 deletions(-)
diff --git a/build.ninja b/build.ninja
@@ -23,7 +23,6 @@ rule install
include config.ninja
-build po/manpage.pot: xgettext_man badwolf.1 | po/pot_license.ed
build icons/hicolor/scalable/apps/badwolf.svg: scour badwolf.svg
build uri_test: cc_exe uri_test.c uri.o
diff --git a/configure b/configure
@@ -360,7 +360,6 @@ rule cc_exe
rule cc_obj
command = \$CC -std=c11 \$CFLAGS -include configure.h \$DEPS_cflags -c -o \$out \$in
-build po/messages.pot: xgettext ${SRCS} | po/pot_license.ed
build badwolf: cc_exe ${OBJS}
EOF
@@ -373,28 +372,19 @@ for obj in ${OBJS}; do
echo
done >>config.ninja
+if [ "$ED" != "false" ]; then
+ echo "build po/messages.pot: xgettext ${SRCS} | po/pot_license.ed"
+ echo 'build po/manpage.pot: xgettext_man badwolf.1 | po/pot_license.ed'
+fi >>config.ninja
+
for trans in ${TRANS}; do
- if [ "$ED" != "false" ]; then
- echo "build po/${trans}.po: msgmerge po/messages.pot"
- else
- if test ! -e "po/${trans}.po"; then
- echo "Error: po/${trans}.po not found and ed(1) is missing/disabled" >&2
- exit 1
- fi
- fi
+ echo "build po/${trans}.po: msgmerge po/messages.pot"
echo "build locale/${trans}/LC_MESSAGES/Badwolf.mo: po2mo po/${trans}.po"
all="${all} locale/${trans}/LC_MESSAGES/Badwolf.mo"
done >>config.ninja
for man in ${TRANS_MAN}; do
- if [ "$ED" != "false" ]; then
- echo "build po/${man}_man.po: xgettext_man badwolf.1"
- else
- if test ! -e "po/${man}_man.po"; then
- echo "Error: po/${man}_man.po not found and ed(1) is missing/disabled" >&2
- exit 1
- fi
- fi
+ echo "build po/${man}_man.po: xgettext_man badwolf.1"
echo "build badwolf.${man}.1: translate_manpage po/${man}_man.po"
bundled="${bundled} badwolf.${man}.1"
trans_man="${trans_man} badwolf.${man}.1"