On Mon, Dec 16, 2013 at 3:49 PM, Jason Gross <jasongro...@gmail.com> wrote:
> These compiled files get distributed/installed, so I think they belong in
> DATA.
>
> The solution I ended up using was manually including an "all-am" target
> below the definition, which overrides the one that automake generates.
>
> I think the other contributors to the project would complain only slightly
> less about depending on automake than they did about depending on autoreconf
> (I ended up setting up an extra branch of the source repo which the
> autogenerated files get automatically pushed to); the intended
> contributors/users of the source repo are mathematicians who may have little
> to no programming experience.
>
> -Jason
>
>
Your problem is like the question in the automake manual about how to
use wildcards in automake variables (e.g. DATA, SOURCES) that list
files (the answer being it is not possible). In both cases the list of
files is not in Makefile.am, but to be determined later (either by
wildcard expansion or editing the included file).

In the case of wildcard expansion, the manual notes that the expansion
would have to be done by the automake process, requiring automake to
be re-run each time make was (or each time new files were added).
(This was due to the lack of portable make wildcard facilities.) This
would not necessarily be the case for your problem, though. But in
general this approach does not seem to be supported: even if it could
be made to work for DATA (having an include in the generated makefile
setting variables that the makefile uses), it probably wouldn't work
for SOURCES.

All this is assuming that automake does not get re-run when make does.
Diego mentioned maintainer mode: if you include a file in Makefile.am,
the generated makefile should see that as a dependency of Makefile.in.
Hence whenever you run make, if the included file has changed,
Makefile.in and Makefile should be rebuilt automatically - no need for
the user to run automake (like they were running autoconf). There is
still a dependency on automake, but only that it has to be installed -
the user shouldn't have to run it themselves.

Reply via email to