automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question about sources in multiple directories


From: Tom Tromey
Subject: Re: question about sources in multiple directories
Date: 10 Feb 2001 12:22:44 -0700

>>>>> "Matthew" == Matthew R MacIntyre <address@hidden> writes:

Matthew> How can I get automake setup the Makefile in the test/
Matthew> directory to link with the objects in the src/ directory?

You'd think that this would work:

    AUTOMAKE_OPTIONS = subdir-objects
    check_PROGRAMS = testprog
    testprog_SOURCES = test.c ../src/back.c ../src/end.c

Unfortunately, it doesn't :-(.  It's a bit hard to recall why I
disallowed this.  It was either

(a) a pedantic decision based on the idea that `../src' might not be
in the project (which would be losing because we can actually check
that), or

(b) based on the idea that determining the correct dependency file for
`../src/back.c' would be "too hard".  You see, we really want to limit
the amount of processing we do at compilation time.  We're already
invoking a shell script which runs sed and stuff (yuck), but my
long-term goal here is that if the user is using gcc 3 we should
simply be able to invoke it without running depcomp.

I imagine it was (b) because of the comment in
&handle_single_transform_list.

A long time ago I made the decision to put dependency files into a
subdir instead of having them clutter up the build directory (and
corresponding usurp some random suffix, like `.d', which might
otherwise be useful).  Now I wonder if that was such a hot idea.  If
we put the dependency files directly into the objdir things might
become a lot simpler.  Comments?

Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]