Skip to content
This repository has been archived by the owner on Jun 22, 2023. It is now read-only.

patch: automake subdir-objects #11

Closed
hdatma opened this issue Jan 2, 2016 · 4 comments
Closed

patch: automake subdir-objects #11

hdatma opened this issue Jan 2, 2016 · 4 comments

Comments

@hdatma
Copy link

hdatma commented Jan 2, 2016

Problem:

[...]
configure.ac:44: installing './missing'
src/Makefile.am:3: warning: source file '$(top_srcdir)/openbsd-compat/fgetln.c' is in a subdirectory,
src/Makefile.am:3: but option 'subdir-objects' is disabled
automake-1.15: warning: possible forward-incompatibility.
automake-1.15: At least a source file is in a subdirectory, but the 'subdir-objects'
automake-1.15: automake option hasn't been enabled. For now, the corresponding output
automake-1.15: object file(s) will be placed in the top-level directory. However,
automake-1.15: this behaviour will change in future Automake versions: they will
automake-1.15: unconditionally cause object files to be placed in the same subdirectory
automake-1.15: of the corresponding sources.
automake-1.15: You are advised to start using 'subdir-objects' option throughout your
automake-1.15: project, to avoid future incompatibilities.
src/Makefile.am:3: warning: source file '$(top_srcdir)/openbsd-compat/res_hnok.c' is in a subdirectory,
src/Makefile.am:3: but option 'subdir-objects' is disabled
src/Makefile.am:3: warning: source file '$(top_srcdir)/openbsd-compat/strlcat.c' is in a subdirectory,
src/Makefile.am:3: but option 'subdir-objects' is disabled
src/Makefile.am:3: warning: source file '$(top_srcdir)/openbsd-compat/strlcpy.c' is in a subdirectory,
src/Makefile.am:3: but option 'subdir-objects' is disabled
src/Makefile.am:3: warning: source file '$(top_srcdir)/openbsd-compat/strsep.c' is in a subdirectory,
src/Makefile.am:3: but option 'subdir-objects' is disabled
src/Makefile.am:3: warning: source file '$(top_srcdir)/openbsd-compat/strtonum.c' is in a subdirectory,
src/Makefile.am:3: but option 'subdir-objects' is disabled
src/Makefile.am: installing './depcomp'
[...]

Patch:

perl -i.bak -ple 's|^AM_INIT_AUTOMAKE$|AM_INIT_AUTOMAKE([subdir-objects])|' configure.ac;

Result:

[...]
configure.ac:44: installing './missing'
src/Makefile.am: installing './depcomp'

  • rm -Rf autom4te.cache
    [...]

Comments:
no comment

@ericfaurot
Copy link
Contributor

This makes ./bootstrap happy, but it breaks the build...

@poolpOrg
Copy link
Member

On Fri, Jan 22, 2016 at 07:19:15AM -0800, Eric Faurot wrote:

This makes ./bootstrap happy, but it breaks the build...

yes, it requires a bit of adapting the autoshit layer...

I've done it in the past, I can have a look at this later if you want ;-)

@edrozenberg
Copy link

edrozenberg commented Feb 24, 2018

I ran into these warnings and like the autopaste monkey I am was getting ready to use AM_INIT_AUTOMAKE([subdir-objects]) from the first Google article I found. Luckily this issue here tells me not to :).

@ericfaurot
Copy link
Contributor

The build system has been completely reworked.
I don't think this ticket is relevant anymore.
I'll close it shortly if there is no objection.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants