"Too, Justin A." <t...@llnl.gov> writes: > Can I define SOME_TEST in only one Makefile.am and make it available to > all of the others? I have many Makefile.ams that require the SOME_TEST > variable and I would prefer not having to define it in every Makefile.am > individually. If I have it in one location, it provides me the flexibility > to easily swap SOME_TEST = X or SOME_TEST = Y at a later stage if > necessary.
If you want SOME_TEST defined everywhere automatically, you should use configure.ac. As an alternative you can create a file of Makefile fragments and use the Automake "include" directive to include that in each of your "Makefile.am"s. Personally I prefer the latter. One sometimes-nice advantage is that modifying the include file requires only rerunning Automake, which is faster than rerunning Autoconf and Automake. -- Ben Pfaff http://benpfaff.org