[Top][All Lists]

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

Re: Library dependency files

From: Erik Rull
Subject: Re: Library dependency files
Date: Wed, 28 Apr 2010 23:34:24 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20090605 SeaMonkey/1.1.17

Todd Showalter wrote:
    We're case b, but the problem remains.  I'll try to give a more
concrete example:

    Say we've got an environment variable, $BUILD_NETWORK_SUPPORT, and
it's currently set to 0.  Within the makefile we have


    Within a C file we have:

#include "Network.h"
#include "Network.Stub.h"

    Now say on the command line I do:


    The second invocation of make will not detect the change, and the
dependencies will be wrong.

Simple solution:
- write down the current parameter settings that will be changed via Makefile parameters into a file (e.g. echo -en "$(CFLAGS)" > compile_settings.txt; syntax might be wrong, just to show what I want to express) - read the file and compare it to the "current" settings string. If different do a clean and then a make and sync the file with the most recent parameters

You just need a function in your makefile how to create the string and how to read the file and compare it and what to do if it has changed.

Should be possible to be solved with pure make.

Best regards,


reply via email to

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