Conditional subdir-objects

Andriy Moroz picture Andriy Moroz · Jul 11, 2012 · Viewed 7.2k times · Source

I have option subdir-objects set in configure.ac:

AM_INIT_AUTOMAKE([subdir-objects])

Is there any possibility to conditionally disable it in particular Makefiles (Makefile.am)?

Thanks.

Answer

Jack Kelly picture Jack Kelly · Jul 11, 2012

According to the list of automake options, no. What you can do instead is remove subdir-objects from the call to AM_INIT_AUTOMAKE and add it to the Makefile.am files where you actually want it. You do that by putting the line AUTOMAKE_OPTIONS = subdir-objects at the top of any relevant Makefile.am. (There's no no-subdir-objects option, apparently.)