Wikipedia:Reference desk/Archives/Mathematics/2006 July 15

Humanities Science Mathematics Computing/IT Language Miscellaneous Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions at one of the pages linked to above.

< July 14 Mathematics desk archive July 16 >


Generated texinfo documents with GNU Automake.

edit

I'm converting a small package to use GNU Automake. This package has documentation which is generated from an input file and a script; simple enough to write a Makefile rule for. However, if I simply put the rule for generating it in Makefile.am and set info_TEXINFOS = generated.texi, then Automake complains:

automake: doc/Makefile.am: couldn't open `doc/generated.texi': No such file or directory

I tried adding generated.texi to BUILT_SOURCES, but this makes no difference, Automake still won't run. On the other hand, if I build generated.texi first, I can run Automake. Then, even if I do a make clean, I can still make generated.dvi, for instance; it makes the files listed in BUILT_SOURCES before trying anything else, so that works fine. I can even take the generated tarball and ./configure && make && sudo make install it; the only problem appears to be with automake refusing to accept that the input will be generated later.

An alternate course I tried was to use nodist_info_TEXINFOS to cause the generated file not to be wrapped up in the distribution tarball. This worked, but now make all doesn't generate it. make generated.texi does, of course, but this means that the Info files aren't created or installed at compile time---not what I was looking for.

What's the cleanest course of action from this point? If I use the former (working) configuration to make generated.texi, then the next person who plays with the Automake configuration starting from make maintainer-clean will be very confused at why it suddenly stopped working.

Is this a bug in Automake that I should report? Thoughts? grendel|khan 18:53, 15 July 2006 (UTC)[reply]

An update: this application also uses generated manpages. However, when I list them in man_MANS = generated.1 generated.3, Automake doesn't complain when I run it, even though they're not in the distribution tarball (despite the lack of nodist_) and are created and installed at build-time (thanks to being listed in BUILT_SOURCES. If I list them in BUILT_SOURCES and nodist_man_MANS, which I think is the semantically correct way of doing it, the manpages don't get created or installed at runtime.

The upshot of all this is that if Automake didn't complain about generated.texi not being present when it runs--something it only seems to care about for the TEXINFOS primary, not the MANS primary--everything would be fine here. grendel|khan 05:57, 16 July 2006 (UTC)[reply]