X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=autogen.sh;h=87fb83d7f1c0b57f73957a7dd1350af633f55c8d;hb=361792d9aa11f7affdabd844998390d16ed5b354;hp=8d54a639e7785d1540d50c081e9b9c65b6d758ac;hpb=a43ef7612a6e6d650f5d7368b7ac9e0771b07ff6;p=hvgrip.git diff --git a/autogen.sh b/autogen.sh index 8d54a63..87fb83d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -7,6 +7,9 @@ set -e # To test that we are really in the top-level directory TEST_FILE=src/grip.c +# Where to copy gettext.h +GETTEXT_INC_DIR=src + test -f ${TEST_FILE} || { echo "Error: You must run this script in the top-level project directory" exit 1 @@ -23,4 +26,19 @@ touch ChangeLog autoreconf -v --install --force +# Update gettext files +if [ -f po/Makevars ]; then + rm po/Makevars.template +fi + +# If po/POTFILES.in is not present, po/Makefile won't be generated when running +# ./configure +if [ ! -f po/POTFILES.in ]; then + touch po/POTFILES.in +fi + +if [ ! -f ${GETTEXT_INC_DIR}/gettext.h ]; then + cp /usr/share/gettext/gettext.h ${GETTEXT_INC_DIR} +fi + rm -rf autom4te.cache