[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Automake 1.15 + subdir-objects using $(top_srcdir) in *_SOURCES
From: |
Tom Ghyselinck |
Subject: |
Automake 1.15 + subdir-objects using $(top_srcdir) in *_SOURCES |
Date: |
Tue, 18 Aug 2015 10:08:02 +0200 |
Hi all,
I just upgraded to automake-1.15.
I got a warning about future incompatibilities:
src/Makefile.am:205: warning: source file
'StackControllers/AbstractController.cpp' is in a subdirectory,
src/Makefile.am:205: 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.
We use "<subdir>/<source_file>.cpp" in some "*_SOURCES" entries in our
"Makefile.am" files.
Since I don't like warnings, I followed the suggestion and added the "s
ubdir-objects" option in our configure.ac.
Now, in one of our Makefile.am we are using
gtest_SOURCES = $(top_srcdir)/src/globaloptions.cpp ...
We build our project in /tmp/build.
When trying to execute "make clean" for our project, we get the error:
Making clean in testing
make[2]: Entering directory '/tmp/build/src/testing'
Makefile:1193: /path/to/source/src/.deps/gtest-globaloptions.Po: No such
file or directory
make[2]: *** No rule to make target
'/path/to/source/src/.deps/gtest-globaloptions.Po'. Stop.
make[2]: Leaving directory '/tmp/build/src/testing'
Makefile:1513: recipe for target 'clean-recursive' failed
Is this a known issue?
Or is it incorrect to use "$(top_srcdir)" in the "*_SOURCES" directive
when using the "subdirs-objects" option?
We would like to keep using the "$(top_srcdir)" since the subdirs where
the Makefile.am using this resides may move around in the project
directory tree.
Can anyone explain what is going wrong or how we should update this to
keep this working?
Thank you in advance!
With best regards,
Tom.
--
Tom Ghyselinck <address@hidden>
Excentis N.V.
- Automake 1.15 + subdir-objects using $(top_srcdir) in *_SOURCES,
Tom Ghyselinck <=