4 Feb 2004 23:58
Undesired multi pass build
<Roger.Shimada <at> lawson.com>
2004-02-04 22:58:51 GMT
2004-02-04 22:58:51 GMT
I thought that I should ask the mailing list about this before getting lost in the jam source.(Continue reading)We generate .h files based on .c files. For example, we might have common.c: int Answer = 42; from which we generate a common.h in an include directory: extern int Answer; Note that common.c is used to both compile and to generate the header file. Now let's say there is a source.c that does #include <common.h>. There is a library that is built from common.c and source.c. When I update common.c and run jam, common.h gets regenerated and common.c is recompiled. But source.c does not get recompiled. I run jam again, and source.c gets recompiled. Any ideas on how to fix the following Jamfile so an update of common.c will rebuild both common.h and compile both .c files? If not, any hints on fixing this in jam? GENINC = $(GENDIR)/include ; HDRS += $(GENINC) ;
We generate .h files based on .c files. For example, we might have
common.c:
int Answer = 42;
from which we generate a common.h in an include directory:
extern int Answer;
Note that common.c is used to both compile and to generate the header
file.
Now let's say there is a source.c that does #include <common.h>.
There is a library that is built from common.c and source.c.
When I update common.c and run jam, common.h gets regenerated and common.c
is recompiled. But source.c does not get recompiled. I run jam again, and
source.c gets recompiled.
Any ideas on how to fix the following Jamfile so an update of common.c
will rebuild both common.h and compile both .c files? If not, any hints
on fixing this in jam?
GENINC = $(GENDIR)/include ;
HDRS += $(GENINC) ;
RSS Feed