summaryrefslogtreecommitdiff
path: root/sys/src/cmd/awk
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-05-24 16:00:45 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2020-05-24 16:00:45 +0200
commit9960a125a39bff42912525216bf23539e4000f9c (patch)
tree5fd65e36bb09178f470c3a2ff04119044bc2cb77 /sys/src/cmd/awk
parentf59101231a5513bfa12149504f3ba26323962332 (diff)
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.
Diffstat (limited to 'sys/src/cmd/awk')
-rw-r--r--sys/src/cmd/awk/mkfile5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/src/cmd/awk/mkfile b/sys/src/cmd/awk/mkfile
index 3ae596b0e..b679c6af2 100644
--- a/sys/src/cmd/awk/mkfile
+++ b/sys/src/cmd/awk/mkfile
@@ -45,5 +45,6 @@ proctab.c: $cputype.maketab
$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