Lars Gullik Bjønnes wrote:

> If we want it automake-based then configure must do the job.

This is not possible since lib/lyx2lyx/lyx2lyx_version.py is needed for make
dist.

> I'll think a bit about it... but I am not sure I'll find a good
> solution.

Lars, did you find a solution? If not I would like to apply the attached
patch (based on Jean-Marcs script). OK?


Georg
Index: configure.ac
===================================================================
--- configure.ac	(Revision 13709)
+++ configure.ac	(Arbeitskopie)
@@ -442,7 +442,6 @@ AC_CONFIG_FILES([Makefile  m4/Makefile \
        development/lyx.spec \
        lib/Makefile \
        lib/doc/Makefile \
-       lib/lyx2lyx/lyx2lyx_version.py \
        lib/lyx2lyx/Makefile \
        intl/Makefile \
        po/Makefile.in \
Index: autogen.sh
===================================================================
--- autogen.sh	(Revision 13709)
+++ autogen.sh	(Arbeitskopie)
@@ -127,6 +127,21 @@ else
 	exit 1
 fi
 
+version=`grep AC_INIT configure.ac | sed 's/^.*AC_INIT([^,]*,\([^,]*\),.*$/\1/'`
+
+echo "LyX version is $version"
+
+file=lib/lyx2lyx/lyx2lyx_version.py
+
+if ! test -r $file.in ; then
+	echo "$file.in not found -- aborting."
+	exit 1
+fi
+
+echo "Generating $file..."
+sed "s/@PACKAGE_VERSION@/$version/" <$file.in >$file
+echo "done."
+
 echo
 echo 'run "./configure ; make"'
 echo

Reply via email to