Re: Preventing compilation of a C file
Magnus Therning <[email protected]> Sun, 25 Jul 2004 16:39:28 +0200
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Jul 25, 2004 at 03:54:24PM +0200, Bram Moolenaar wrote:
>
>Magnus Therning wrote:
>
>> I have run into some interesting behaviour I think. I have a rule like
>> this:
>>
>> opcodes.h : vdbe.c
>> :print /* Automatically generated file. Do not edit */ >! $(target)
>> :sys grep '^case OP_' vdbe.c | \
>> sed -e 's/://' | \
>> awk '{printf "#define %-30s %3d\n", $$2, ++cnt}' >> $(target)
>>
>> The result of running aap on this is:
>>
>> Aap: Creating directory "/home/magnus/prog/tmp/sqlite/src/build-Linux2_6_7_1_k7"
>> Aap: cc -MM vdbe.c > build-Linux2_6_7_1_k7/vdbe.c.aap
>> In file included from vdbe.c:48:
>> sqliteInt.h:19:20: config.h: No such file or directory
>> sqliteInt.h:20:21: sqlite3.h: No such file or directory
>> sqliteInt.h:22:19: parse.h: No such file or directory
>> Aap: Error in recipe "/usr/lib/aap/default.aap" line 161: :update failed for "config.h"
>>
>> Why does aap insist on compiling vdbe.c?
>> How do I prevent it from doing so?
>
>It is not compiling the file, but it does go through the preprocessor.
>This is required to find dependencies on included files.
>
>However, you appear to use "vdbe.c" by itself, thus it should not
>matter what files are included. In that case you can disable the
>dependency check:
>
> opcodes.h : vdbe.c {autodepend = off}
Ah, perfect. Exactly what I was looking for.
>This is explained at the start of Chapter 29.
I really should have found that one I guess.
Thanks for the pointer though.
/M
--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
[email protected]
http://magnus.therning.org/
To be sexy, hackers need to learn how to emit fitness-to-reproduce signals.
-- Eric S. Raymond
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBA8YgiMWTaatN+6QRAnmoAJ9ehHmG9bZWhgaW/SnbnKia7Xoy+gCg6UUv UhQ4aqA5hCNWIiQ22xKM3vs= =td/i -----END PGP SIGNATURE-----