]> git.lyx.org Git - features.git/commitdiff
Make sure that an empty po/POTFILES.in file exists at configure time,
authorEnrico Forestieri <forenr@lyx.org>
Wed, 26 Sep 2007 22:50:00 +0000 (22:50 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Wed, 26 Sep 2007 22:50:00 +0000 (22:50 +0000)
otherwise no Makefile is generated in the po dir and compilation fails.
Once the empty file served the purpose, remove it in order to
immediately trigger its regeneration, which would only happen after
updating one of the Makefile.am files.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20527 a592a061-630c-0410-9148-cb99ea01b6c8

configure.ac
m4/po.m4

index bb539e21554f1b6f4da176bf575ce50f292774c8..e010c8175dad6ef12f291a54d19436c84c2983e8 100644 (file)
@@ -33,6 +33,9 @@ for file in config/install-sh config/mkinstalldirs ; do
   chmod 755 ${srcdir}/${file}
 done
 
+### Provide a dummy POTFILES.in in po in order to mark it as a PO directory
+test -f ${srcdir}/po/POTFILES.in || touch ${srcdir}/po/POTFILES.in
+
 ### Check for programs
 AC_PROG_MAKE_SET
 AC_PROG_INSTALL
index f2795eea0ca42665ceedb08f4dd90f79c25bfe1f..1a5353681edc43cf45ff29a62692260fb0571a94 100644 (file)
--- a/m4/po.m4
+++ b/m4/po.m4
@@ -114,6 +114,13 @@ AC_DEFUN([AM_PO_SUBDIRS],
           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
           cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[  ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
           POMAKEFILEDEPS="POTFILES.in"
+          # Remove POTFILES.in if it is empty, such that it can be
+          # correctly rebuilt later.
+          if test -s "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+            : ;
+          else
+            rm -f "$ac_given_srcdir/$ac_dir/POTFILES.in"  
+          fi
           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
           # on $ac_dir but don't depend on user-specified configuration
           # parameters.