Am 18.08.2013 um 12:53 schrieb Jürgen Spitzmüller <sp...@lyx.org>:

> Jürgen Spitzmüller wrote:
>> The problem is that TEX2LYX is true when running LyX (not tex2lyx). So in 
>> cases such as in Encodings::validate (#ifdef TEX2LYX ... #else ... #endif), 
>> the wrong code is executed!
>> 
>> The same problem seems to occur vice versa, hence tex2lyx compilaion fails
>> in  the #else part of this code.
> 
> git bisect reveals the following
> 
> 16cdf70d0c4bd18eb066fee21ee7e4f35257d2f5 is the first bad commit
> commit 16cdf70d0c4bd18eb066fee21ee7e4f35257d2f5
> Author: Stephan Witt <sw...@lyx.org>
> Date:   Fri Jul 26 13:04:32 2013 +0200
> 
>    enable automake version 1.14
> 
> :100644 100644 cb56a682553c2bb6ebca60ff5ab3024377c3f6bf 
> 3701e1eef2c8a101c438006ab464fe18738b3dfa M .gitignore
> :100755 100755 a12f744542194c460b55f49b9930e71a5c2210fd 
> 750d7a7bc590057c1c66cc776786476cbc978982 M autogen.sh
> :100644 100644 33371ecc052339adf3c9eaafa83aaafd877bc898 
> c5fc54cddb1c5352ac691f37fc70dcfe73ec0866 M configure.ac
> 
> 
> And indeed if I revert the following change, the problem disappears:
> 
> --- a/configure.ac
> +++ b/configure.ac
> @@ -27,7 +27,7 @@ fi
> AM_MAINTAINER_MODE
> 
> save_PACKAGE=$PACKAGE
> -AM_INIT_AUTOMAKE([foreign dist-bzip2 no-define 1.8])
> +AM_INIT_AUTOMAKE([foreign dist-bzip2 no-define 1.8 subdir-objects])
> m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
> PACKAGE=$save_PACKAGE
> 
> 
> This also fixes "make distclean" for me.
> 
> Jürgen

Ok, now I see the difference too.

I changed this because of the warnings from automake like this:
==================================
boost/Makefile.am:19: warning: source file 'libs/regex/src/c_regex_traits.cpp' 
is in a subdirectory,
boost/Makefile.am:19: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled.  For now, the corresponding 
output
automake: object file(s) will be placed in the top-level directory.  However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same 
subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
==================================

So, we have to revert the addition of subdir-objects to the AM_INIT_AUTOMAKE 
option list.
But there will be a problem in the future. One idea I have to solve this:
Split the Encoding class into a base class for tex2lyx and LyX and a sub-class 
for LyX only.
Then link the base class with tex2lyx and the sub-class with LyX.
What do you think?

Stephan

Reply via email to