stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: makefile patch
Date Thu, 15 Dec 2005 23:38:59 GMT
Liviu Nicoara wrote:
>>>I think we had those at some point in the past. IIRC, I took them out
>>>because I thought it was cleaner to have them in the individual (sub)
>>>makefiles instead. I.e., the top level makefile shouldn't need to know
>>>all the dependencies of each subcomponent. It easy to miss some (such
>>>as the dependency of tests on rwtest).
> Funny thing... I believe the makefiles are too smart. :-)
> I believe there is a problem with completely removing the all/lib/etc.
> dependencies listed in top level GNUmakefile:
> 1. invoke make in topdir with target lib (or no target & pick lib as
>    first target)
> 2. lib target invokes make recursively in BUILDDIR w/ target lib
> 3. target lib has no deps, so invokes make on dir lib where the makefile
>    is GNUmakefile.lib
> 4. GNUmakefile.lib includes *.d files; the rule for building them gets
>    invoked before any other target is considered
> Step 4 fails because config.h is missing.

I see. Would including the .d files conditionally, only if config.h
exists, be a way to solve the problem?


> If I have the deps listed in the top level GNU makefile then the config
> is executed first, followed by the actual target passed to it.
> It is possible that any other target we try to build starting from
> TOPDIR will fail in a similar way - haven't tried.
> So, the long story short, I don't think I can change this flow without
> some major makefile reorganization. I believe we should go ahead with
> the explicit deps in top level GNUmakefile.
> Liviu

View raw message