If xgettext fails, make Sanitize fail
[deliverable/binutils-gdb.git] / ld / .Sanitize
index 322888c914560a3449fafad46ca47b737e5aa2db..91b8d3c1cf98952c316a80ac77660acfe1339be1 100644 (file)
@@ -299,4 +299,26 @@ for i in * ; do
        fi
 done
 
+# This must come after all other sanitizations.  Re-sanitize the .pot
+# file.
+if [ -n "${verbose}" ]; then
+   echo Re-computing files for gettext ...
+fi
+
+if [ -n "${safe}" -a ! -f po/.Recover/POTFILES.in ]; then
+   if [ -n "${verbose}" ]; then
+      echo Caching po/POTFILES.in in .Recover...
+   fi
+   mv po/POTFILES.in po/.Recover
+fi
+find . -name '*.[ch]' | sed -e 's,^\./,,' > po/POTFILES.in
+
+if [ -n "${safe}" -a ! -f po/.Recover/ld.pot ]; then
+   if [ -n "${verbose}" ]; then
+      echo Caching po/ld.pot in .Recover...
+   fi
+   mv po/ld.pot po/.Recover
+fi
+# If this fails, Sanitization must fail.
+xgettext `cat po/POTFILES.in` -o po/ld.pot || exit 1
 # eof
This page took 0.023518 seconds and 4 git commands to generate.