[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automatic macro dependencies
From: |
Kristof Provost |
Subject: |
Re: Automatic macro dependencies |
Date: |
Tue, 5 Aug 2008 22:31:46 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2008-08-05 13:58:17 (-0400), Harvey Chapman <address@hidden> wrote:
> Hello all,
>
> I'd like to be able to define a list of macros like (DEBUG_XX, DEBUG_YY)
> and have make detect that a source file needs to be recompiled because
> of a change in that list. These macros are always used with an "#ifdef"
> or an "#if defined()" style pre-processing directive.
>
> I would appreciate any pointers to solutions.
You may want to take a look at how the Linux kernel handles that.
In short: they have a tool scan each source file to find out which
defines it uses (in the kernel they all start with CONFIG_) and it adds
those files as extra dependencies for that source file.
Kristof
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkiYuLEACgkQUEZ9DhGwDuhkuACffQS78TuaPPzBKXTELI7+fbOh
nrsAoIbocxTQfB1Fg+jj7TeBfUDUtoio
=hj/Z
-----END PGP SIGNATURE-----