awk: fix race condition with sub-mk in mkfile

the maketab helper program was generated in parallel, which
had a dependency to y.tab.h which lead to yacc running
twice in parallel.

this removes the dependency to y.tab.h in the virtual
maketab.$objtype target to prevent this race condition.

the dependency to y.tab.h is resolved in the main mk at the
$cputype.maketab target which serializes with the other
targets.
This commit is contained in:
cinap_lenrek 2020-05-24 16:00:45 +02:00
parent f59101231a
commit 9960a125a3

View file

@ -45,5 +45,6 @@ proctab.c: $cputype.maketab
$cputype.maketab: y.tab.h maketab.c $cputype.maketab: y.tab.h maketab.c
objtype=$cputype mk maketab.$cputype objtype=$cputype mk maketab.$cputype
maketab.$objtype:V: y.tab.h maketab.$O maketab.$objtype:V:
$LD -o $objtype.maketab maketab.$O $CC $CFLAGS maketab.c
$LD $LDFLAGS -o $objtype.maketab maketab.$O