From: | "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx> |
Date: | Thu, 18 Nov 2004 05:05:31 +0100 |
When the tree is checked out, *.c files get updated earlier than *.y files,Modified files: gnu/usr.bin/gdb/gdb Makefile Log: Use the YACC source for c-exp.y and f-exp.y, not the pre-built BISON parse. This solves the *very* strange build problem with -jX in buildworld, where make tries to build this files from source using the default rules. Those rules are not save for parallel builds.Thanks. Although I'd really like to know why these *explicit* sources (.c) get updated from the *implicit* (.y) sources...
making the latter slightly newer than the former.
See the difference? That is, when [cf]-exp.c but not [cf]-exp.y are
specified in SRCS, suffix rule .y.c from sys.mk is used, which is not
-j safe (already pointed out by Brad Harvell on bugs@), because multiple
instances of ${YACC} try to write to the same y.tab.c file(and probably
unlink it before writing to it). When [cf]-exp.y are specified in SRCS on the
other hand, the `.for _YSRC' rule in bsd.dep.mk produces explicit rules for
each *.y file using `${YACC} ${YFLAGS} -o'.
To summarize, if SRCS contains more than one *.c file having corresonding
newer *.y files in the same directory, `make -jN depend' may fail depending
on the mtime of *.c and *.y. As of gnu/usr.bin/gdb/Makefile rev 1.5, scm-exp.c
is the only *.c that has corresponding *.y in the same directory(which is
slightly newer because of the order of cvs checkout).
The question is, whether we can change .y.c rule in sys.mk to make it -jN
(as pointed out by Brad).
cheers simon
-- /"\ \ / \ ASCII Ribbon Campaign / \ Against HTML Mail and News
Attachment:
PGP.sig
Description: This is a digitally signed message part