coin-or-tools / BuildTools

Macros and patches for GNU autotools
https://coin-or-tools.github.io/BuildTools/
Other
3 stars 7 forks source link

Allow source in subdirectories #133

Closed tkralphs closed 4 years ago

tkralphs commented 4 years ago

Is there a reason not to allow source to be in subdirectories? I'm in the process of converting SYMPHONY to the new build system. Currently, SYMPHONY has a multi-level structure in its src directory and this is not supported in master. Changing the call to AM_INIT_AUTOMAKE to

AM_INIT_AUTOMAKE([no-define no-dist -Wall subdir-objects])

fixes the issue. Is there any downside to this?

svigerske commented 4 years ago

I usually put the subdir-objects into the Makefile.am where necessary:

AUTOMAKE_OPTIONS = foreign subdir-objects
tkralphs commented 4 years ago

Ah, OK, I missed that you can do that. Thanks!

svigerske commented 4 years ago

I'll still give it a try to add this to AM_INIT_AUTOMAKE.

svigerske commented 4 years ago

@tkralphs You can (and probably should) leave out the setting of AUTOMAKE_OPTIONS in Makefile.am. The current AUTOMAKE_OPTIONS = foreign seems to have overwritten AM_INIT_AUTOMAKE setting from coin.m4. At least the -Wall didn't seem to have been applied.