6

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.

Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
Andriy Moroz
  • 63
  • 1
  • 4

1 Answers1

9

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.)

Jack Kelly
  • 18,264
  • 2
  • 56
  • 81
  • This worked better for me than adding `[subdir-objects]` to AM_INIT_AUTOMAKE because I have included modules that use subdirs. By using this option I don't need to modify every top-level `configure.ac` file. – vy32 Jul 10 '13 at 00:07