]> git.alsa-project.org Git - alsa-utils.git/commitdiff
gitcompile: extensions for gettext and error handling HEAD master
authorJaroslav Kysela <perex@perex.cz>
Mon, 11 May 2026 16:07:57 +0000 (18:07 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 11 May 2026 16:08:10 +0000 (18:08 +0200)
The gettextize script tends to suggest some solutions, but we
are using them already.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
gitcompile

index ed5a73b9ec3b037ca94b18a168da6348862e4f2d..9081fb52aee8b6f6c9e5b2694b41a8a8f8adb9ba 100755 (executable)
@@ -1,22 +1,37 @@
 #!/bin/bash
 
+error() {
+  echo "$@"
+  exit 1
+}
+
+GETTEXTIZE=$(which gettextize)
+
+if test -z "$GETTEXTIZE"; then
+  echo "gettextize not found"
+  exit 1
+fi
 if test -d ../alsa-lib/utils && ! test -r `aclocal --print-ac-dir`/alsa.m4; then
   ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I ../alsa-lib/utils"
 fi
 # save original files to avoid stupid modifications by gettextize
-cp Makefile.am Makefile.am.ok
-cp configure.ac configure.ac.ok
-gettextize -c -f --no-changelog
+cp Makefile.am Makefile.am.ok || error "cp Makefile.am"
+cp configure.ac configure.ac.ok || error "cp configure.ac"
+# modify gettexize to not wait for Enter
+grep -v -E "(/dev/tty|Press Return)" "$GETTEXTIZE" > gettextize || error "grep $GETTEXTIZE"
+chmod 755 gettextize || error "chmod 755 gettexize"
+./gettextize -c -f --no-changelog || error "gettexize"
+rm ./gettextize
 echo "EXTRA_DIST = gettext.m4" > m4/Makefile.am
 cp Makefile.am.ok Makefile.am
 cp configure.ac.ok configure.ac
 touch ltconfig
-libtoolize --force --copy --automake
-aclocal $ACLOCAL_FLAGS -Im4
-autoheader
-automake --foreign --copy --add-missing
+libtoolize --force --copy --automake || error "libtoolize"
+aclocal $ACLOCAL_FLAGS -Im4 || error "aclocal"
+autoheader || error "autoheader"
+automake --foreign --copy --add-missing || error "automake"
 touch depcomp          # for older automake
-autoconf
+autoconf || error "autoconf"
 export CFLAGS='-O2 -Wall -W -Wunused-const-variable=0 -pipe -g'
 echo "CFLAGS=$CFLAGS"
 echo "./configure $@"