3
votes

I am forced to learn some things about autotools for my job, and I really don't know what I'm doing. Our project is often distributed using rpms, and we want to remove our test code from our rpm builds. To fix this problem, I edited AC_OUTPUT in configure.ac to only include the check Makefile if configured to do so (before it did this regardless).

Since making this change, automake has stopped generating Makefile.in from Makefile.am in the test directories. I'm thinking that I need some way to tell automake to generate these Makefile.in files, but I can't figure out how to do it. I can't seem to find how to specify this separately. Can show me how to do that or point me in the right direction?

1

1 Answers

1
votes

It turns out that the way to solve this problem for me was to use AC_CONFIG_FILES instead of tinkering with SUBDIRS. In configure.ac, instead of adding the test directories to the AC_OUTPUT list, the way to resolve it was to include them using the AC_CONFIG_FILES. This solves my problem so that:

  1. The Makefiles aren't built unless configured to do so.
  2. The Makefile.in files are built.