[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-devel] Re: tolua++ Makefile targets

From: Ronald Lamprecht
Subject: [Enigma-devel] Re: tolua++ Makefile targets
Date: Sat, 15 Apr 2006 11:57:27 +0200
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Hi Tacvek,

Tacvek wrote:
P.S. You did receive my makefile fragment for generating lua-*.* from *-lua.pkg right?

Your makefile rules may need configure.ac modifications, as with a fresh checkout from the repository the modification dates of *.cc and *.pkg are undetermined, but we cannot rebuild *.cc from *.pkg until we have tolua++. And tolua++ does not exists on process of configure.ac. That was the reason I first asked for a makefile target and not rules (and I guess the reason why Daniel did comment out the old rules). Just need some time to find a proper solution.

Hmm... Quite a long time ago everything worked perfectly. Tolua was used
when needed, and tolua was available because the tools directory was built before the main directory. Note that the current configure script appeared to set $TOLUA to 'tools/tolua' automatically for me. However, I've never been very clear on the way
version control systems handle modification dates. It may be that the old
method worked fine for CVS and/or TLA, but does not work with SVN.

I rechecked the reasons why the old tolua rules have been commented out:

Indeed tools/tolua is build before the src directory - no problem.

But the subversion checkout modifications dates of *.cc, *.hh and *.pkg are the dates the files are downloaded and stored on the local system. Thus a *.pkg might be "newer" than the generated *.cc, *.hh. This causes a rebuild of the *.cc, *.hh which is a modification:

address@hidden:~/workareas/enigma6> svn status
M      src/lua-editor.cc
M      src/lua-editor.hh
M      src/Makefile.am
address@hidden:~/workareas/enigma6> svn diff
Index: src/lua-editor.cc
--- src/lua-editor.cc   (Revision 125)
+++ src/lua-editor.cc   (Arbeitskopie)
@@ -1,6 +1,6 @@
 ** Lua binding: editor
-** Generated automatically by tolua++-1.0.91 on Fri Mar 31 15:50:43 2006.
+** Generated automatically by tolua++-1.0.91 on Fri Apr 14 18:46:58 2006.

 #ifndef __cplusplus
Index: src/lua-editor.hh

This causes trouble with the next commit ...

There are several solutions to the problem:
1. comment out the rules as Daniel did
2. introduce a special target that you have to make manually if you modify the *.pkg 3. eliminate the generated *.cc, *.hh from the repository and supply appropriate build rules

Solution 3. looks like the best one. But you would have to fiddle with makefile.am as automake supports only yacc and lex as *.cc generators. You can test it by a fresh checkout and immediate deletion of src/lua-*. As far as I know you would have to supply suffix-rules for automake. But then we would have to rename the *.pkg to be suffix-rule compatible - I guess that would be acceptable to Daniel? The distribution of the correct source files would have to be checked, too.

- Ronald

reply via email to

[Prev in Thread] Current Thread [Next in Thread]