New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automake warnings about 'subdir-objects' #33

Closed
mbiebl opened this Issue Feb 13, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@mbiebl
Contributor

mbiebl commented Feb 13, 2014

Version: 7.6.0

When using automake 1.14, I get the following warnings during autoreconf:

autoreconf: running: automake --add-missing --copy --force-missing
Makefile.am:55: warning: '%'-style pattern rules are a GNU make extension
plugins/omelasticsearch/Makefile.am:4: warning: source file 'cJSON/cjson.c' is in a subdirectory,
plugins/omelasticsearch/Makefile.am:4: but option 'subdir-objects' is disabled
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.
runtime/Makefile.am:7: warning: source file '../action.c' is in a subdirectory,
runtime/Makefile.am:7: but option 'subdir-objects' is disabled
runtime/Makefile.am:7: warning: source file '../threads.c' is in a subdirectory,
runtime/Makefile.am:7: but option 'subdir-objects' is disabled
runtime/Makefile.am:7: warning: source file '../parse.c' is in a subdirectory,
runtime/Makefile.am:7: but option 'subdir-objects' is disabled
runtime/Makefile.am:7: warning: source file '../outchannel.c' is in a subdirectory,
runtime/Makefile.am:7: but option 'subdir-objects' is disabled
runtime/Makefile.am:7: warning: source file '../template.c' is in a subdirectory,
runtime/Makefile.am:7: but option 'subdir-objects' is disabled
autoreconf: Leaving directory `.'
@rgerhards

This comment has been minimized.

Member

rgerhards commented Feb 14, 2014

just asking... do you happen to know a proper fix for this? ;)

@rgerhards rgerhards added the bug label Feb 14, 2014

@mbiebl

This comment has been minimized.

Contributor

mbiebl commented Feb 15, 2014

a/ don't use subdirs in your makefiles
b/ set the subdir-objects AUTOMAKE option like this
AM_INIT_AUTOMAKE([subdir-objects])

mbiebl added a commit to mbiebl/rsyslog that referenced this issue Feb 15, 2014

Use automake 'subdir-objects' option
Newer automake versions complain if we use source files in subdirectories:

autoreconf: running: automake --add-missing --copy --force-missing
plugins/omelasticsearch/Makefile.am:4: warning: source file 'cJSON/cjson.c' is in a subdirectory,
plugins/omelasticsearch/Makefile.am:4: but option 'subdir-objects' is disabled
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.
runtime/Makefile.am:7: warning: source file '../action.c' is in a subdirectory,
runtime/Makefile.am:7: but option 'subdir-objects' is disabled
runtime/Makefile.am:7: warning: source file '../threads.c' is in a subdirectory,
runtime/Makefile.am:7: but option 'subdir-objects' is disabled
runtime/Makefile.am:7: warning: source file '../parse.c' is in a subdirectory,
runtime/Makefile.am:7: but option 'subdir-objects' is disabled
runtime/Makefile.am:7: warning: source file '../outchannel.c' is in a subdirectory,
runtime/Makefile.am:7: but option 'subdir-objects' is disabled
runtime/Makefile.am:7: warning: source file '../template.c' is in a subdirectory,
runtime/Makefile.am:7: but option 'subdir-objects' is disabled
autoreconf: Leaving directory `.'

Explicitly set the 'subdir-objects' option to avoid any future issues.

Fixes rsyslog#33

@rgerhards rgerhards closed this in 94b6cbf Feb 16, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment