Re: missing --run/not run
Greetings, Following up on my previous message. On Friday, August 29, 2003, at 10:56 PM, Norman Gray wrote: The problem is, of course, the `missing' script, and what happens when a checked-out generated file apparently needs to be rebuilt on a developer's machine. [...] There seems to be two routes: I described two routes: (i) Wrap make in a script which makes a temporary copy of the Makefile with --run omitted. (ii) Have --run be inside a Makefile macro, which can be overridden to a blank on the command line. There is a third: (iii) modify `missing' so that it can be forced to ignore --run. Having now spent some time getting all this to actually work for us, I can report that (i) turns out to be infeasible in realistic situations, (ii) is probably the best solution but tricky to bolt on, and (iii) does in fact work in practice. Option (i). This works in simple cases. However it doesn't work (or at least, it is clearly extremely fiddly) in more complex cases, since the make-wrapper has to ensure it itself is invoked in sub-makes, which confuses ./configure. Option (ii). This isn't easy to bolt on, since it is not clear to me how one would override the appropriate line of share/aclocal-1.7/missing.m4 in a local acinclude.m4 file. However, I believe this is the most direct solution to the problem -- can I suggest this as a change to automake? It would require changing line 43 of share/aclocal-1.7/missing.m4 from `--run' to `$(missing_run)' and adding `missing_run=--run' to automake-1.7/am/header-vars.am (I think). Option (iii). I modified my package-local version of `missing' so that it ignored the --run option if the variable RUN_LOCAL_AUTOTOOLS was set to false in the environment (it also then needs to handle PROGRAM/$1=true, trivially). With that, `RUN_LOCAL_AUTOTOOLS=false make' updated the timestamps, and did the build, correctly. This works, but is less direct than (ii). I hope these suggestions are useful. Best wishes, Norman -- -- Norman Gray http://www.astro.gla.ac.uk/users/norman/ Physics and Astronomy, University of Glasgow[EMAIL PROTECTED]
Re: missing --run/not run
Greetings, On Fri, 29 Aug 2003 23:39:09 +0100, Paul Brook wrote: We as a project have decided to go the route of checking autotool-generated files into our CVS repository, and as a result are discovering the full subtleties of the consequences of that, in I suffered similar problems until I discovered AM_MAINTAINER_MODE Thanks for this. I'd seen AM_MAINTAINER_MODE (sorry, I should have mentioned that), but ended up persuaded by the largely negative discussion of it in the FAQ section of the automake manual. It sounds as if it adds a new dimension of version-skew problems (``Well, it works for me! What mode are you in? For that matter, what mode am _I_ in?''), and we have enough of those to be going on with. Have you had this sort of problem in practice? I'm sure there are circumstances where it could be an excellent solution. However in our particular (distributed) group, I feel that maintainer mode would probably cause more debugging hassles and confusions than it would avoid. I note that the last sentence of that particular FAQ section ends ``...and because `missing' isn't enough if you have the wrong version of the tools.'' On the contrary, I think `missing' can be made to be enough (if I'm not missing some problem (ho ho)). All the best, Norman -- -- Norman Gray http://www.astro.gla.ac.uk/users/norman/ Physics and Astronomy, University of Glasgow[EMAIL PROTECTED]
missing --run/not run
Greetings, We as a project have decided to go the route of checking autotool-generated files into our CVS repository, and as a result are discovering the full subtleties of the consequences of that, in particular the issues concerning timestamps in checked-out files. I think I've addressed this problem adequately (and I'm asking for advice on that), but it might be that automake can fairly straightforwardly help make this easier. The problem is, of course, the `missing' script, and what happens when a checked-out generated file apparently needs to be rebuilt on a developer's machine. The `missing --run' mechanism works fine when the locally-installed autoconf is sufficiently up-to-date to work, and also when there is _no_ autoconf installed, however it can fail if there _is_ a local autoconf, but it is too old to process the configure.{in,ac} file correctly. One of the solutions mentioned in the automake manual is to use a script to simply update the timestamps of generated files, and mentions that the GCC folk do this. I've looked at this script, and while it surely works for them, it's not generic, and it's fragile. However, this is essentially what the `missing' script does when it's invoked without the --run option, which means that the problem turns into that of how to suppress that option in the specific case when you know you simply need to update timestamps. There seems to be two routes: First is to write a wrapper for `make' which edits the Makefile with sed 's/missing *--run/missing /, then invokes make on that makefile. This works for me, as far as I've been able to test it (always tricky in these situations). The second route is to have the Makefile include lines like missing_run=--run ... AUTOCONF = ${SHELL} /blah/blah/missing $(missing_run) autoconf That works as usual when invoked as usual, but the command make missing_run= is effectively the update-the-timestamps script, and perfectly generic. Since it never actually attempts to run autoconf/automake/autoheader/etc, it is completely independent of the versions which are or are not installed on the local machine. This also works for me (with hand-hacking of the Makefile, admittedly, rather than hacking local m4 macros) So, questions: Is this in fact a useful thing to do, or have I missed some obvious showstopping problem? If the second route is in fact useful, is this something it might be handy to include in the Makefile that automake/autoconf generates? Or is this really an autoconf question, and not an automake one? -- I'm a little confused. All the best, Norman -- -- Norman Gray http://www.astro.gla.ac.uk/users/norman/ Physics and Astronomy, University of Glasgow[EMAIL PROTECTED]
Re: missing --run/not run
On Friday 29 August 2003 10:56 pm, Norman Gray wrote: Greetings, We as a project have decided to go the route of checking autotool-generated files into our CVS repository, and as a result are discovering the full subtleties of the consequences of that, in particular the issues concerning timestamps in checked-out files. I think I've addressed this problem adequately (and I'm asking for advice on that), but it might be that automake can fairly straightforwardly help make this easier. I suffered similar problems until I discovered AM_MAINTAINER_MODE Adding this to configure.ac disables the rules for the automatic regeneration autotool generated files. Developers can still enable these rules by configuring with --enable-maintainer-mode. Paul