ref: a7a128449cf1d023e6a604bcd92e54f6998dc4f6
parent: 4ab0a70f241797b890ceacee70b5685479c93de7
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun May 24 12:00:45 EDT 2020
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.
--- a/sys/src/cmd/awk/mkfile
+++ b/sys/src/cmd/awk/mkfile
@@ -45,5 +45,6 @@
$cputype.maketab: y.tab.h maketab.c
objtype=$cputype mk maketab.$cputype
-maketab.$objtype:V: y.tab.h maketab.$O
- $LD -o $objtype.maketab maketab.$O
+maketab.$objtype:V:
+ $CC $CFLAGS maketab.c
+ $LD $LDFLAGS -o $objtype.maketab maketab.$O
--
⑨