[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
subdir-objects and sources outside of subtree
From: |
Ralf Corsepius |
Subject: |
subdir-objects and sources outside of subtree |
Date: |
Thu, 15 Jan 2004 18:09:40 +0100 |
Hi,
Is this a bug or feature?
Given this Makefile.am (in top_srcdir):
noinst_LIBRARIES = libfoo.a
libfoo_a_SOURCES = \
foo.c \
../bar/bar.c \
$(top_srcdir)/../baz/baz.c
automake accepts this without any complaint.
Without having subdir-objects in AUTOMAKE_OPTIONS, bar.c and baz.c are
treated like VPATH builds, and the Makefile.in contains rules to build
bar.(OBJEXT) rsp. baz.(OBJEXT).
However, if setting subdir-objects in AUTOMAKE_OPTIONS, weird things are
happening:
Automake tries to build
1)
../bar/bar.$(OBJEXT): ../bar/bar.c
i.e. it tries to build to outside of the source tree.
and
$(top_srcdir)/../shared/baz.$(OBJEXT): $(top_srcdir)/../shared/baz.c
i.e. similar to bar, but it into the srcdir !!!!
However before, it can try to build there, ...
2) It creates two directories
bar/.deps
\$\(top_srcdir\)
../baz/.deps
... and dep-tracking is misbehaving
AFAIU, depcomp-initialization (depfiles) creates these directories,
because something doesn't seem get the quotes right (I guess, it's yet
another case of "accommodating java $'s and breaking the shell" (<~) in
quoting).
Below is a tarball to reproduce the effects. Run configure and make from
the toplevel directory. The offending Makefile.am is in config-subdir
foo/
Ralf
autobug-0.5.tar.bz2
Description: application/bzip
- subdir-objects and sources outside of subtree,
Ralf Corsepius <=