Use subdir-objects Automake option
authorKerrick Staley <kerrick@kerrickstaley.com>
Wed, 21 Aug 2013 09:48:30 +0000 (21 02:48 -0700)
committerToni Gundogdu <legatvs@gmail.com>
Thu, 22 Aug 2013 10:06:26 +0000 (22 13:06 +0300)
If you don't pass subdir-objects, Automake 1.14+ will complain loudly
and fail:

[...]
automake: warnings are treated as errors
tests/media/101greatgoals.mk:2: warning: source file
'media/media_101greatgoals.c' is in a subdirectory,
tests/media/101greatgoals.mk:2: but option 'subdir-objects' is disabled
tests/Makefile.am:21:   'tests/media/tests.mk' included from here
tests/media/tests.mk:1:   'tests/media/101greatgoals.mk' included from
here
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled.  For now, the corresponding output
automake: object file(s) will be placed in the top-level directory.  However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
tests/media/ardmediathek.mk:2: warning: source file
'media/media_ardmediathek.c' is in a subdirectory,
tests/media/ardmediathek.mk:2: but option 'subdir-objects' is disabled
[...]

Signed-off-by: Toni Gundogdu <legatvs@gmail.com>
configure.ac

index eeab4d6..5de9872 100644 (file)
@@ -11,7 +11,8 @@ AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_AUX_DIR([config.aux])
 AC_CONFIG_MACRO_DIR([m4])
 
-AM_INIT_AUTOMAKE([1.11.1 -Wall -Werror dist-xz no-dist-gzip tar-ustar])
+AM_INIT_AUTOMAKE([1.11.1 -Wall -Werror dist-xz no-dist-gzip
+                  tar-ustar subdir-objects])
 AM_SILENT_RULES([yes])
 
 # GNU Automake 1.12 requires this macro. Earlier versions do not