[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with circular dependencies
From: |
Jules Colding |
Subject: |
Re: Problem with circular dependencies |
Date: |
Tue, 17 Sep 2013 07:46:17 +0200 |
On Sep 16, 2013, at 11:38 PM, Xochitl Lunde <address@hidden> wrote:
>
> On Sep 16, 2013, at 4:52 PM, Nate Bargmann <address@hidden> wrote:
>
>>> * On 2013 15 Sep 13:18 -0500, Jules Colding wrote:
>>
>>>> So, how do I tell the top-level Makefile.am that it should traverse all
>>>> sub-directories building only the libraries, and then traverse the
>>>> sub-directories again building only the test applications?
>>
>>> Would it work to break the test programs into their own subdirectory and
>>> write the Makefile.am as needed?
>
>> Yes, that would work. I just wanted to keep each test program together with
>> the code which is tested.
>
>> Anyways, thanks for the advises. I'll read the paper on evil recursiveness
>> and ponder what to do.
>
>> Thanks,
>> jules
>
>
> Is there any reason that the two libraries have to be compiled as two
> separate libraries if they depend on each other?
They don't depend on each other, but the test programs has come to depend on
both libraries.
> You can also have Make create just one library out of the files in the two
> directories. You can keep the code organized in the structure, but that
> doesn't mean you can't build it all together into one thing.
>
> Or, if you switch to shared libraries,
I generally dislike shared libraries. I can see their justification for system
libraries which are used all over, but not when used in just one program (or
maybe 2 or 3...).
> maybe you can use a linker flag if it's supported, such as '-undefined
> dynamic_lookup' so that the symbols will only be resolved when the test
> program runs. That only works if you are not running the tests as soon as
> they are built,
I am. I do some coding and then run "make check" to see if I did something
stupid.
Cheers,
jules