ref: 415b5dfe9b46b0137fe10d279bbb7ed61a162ad6
parent: cb3049652da75b7ac00a865cd518f29ff05b3155
author: stanley lieber <[email protected]>
date: Thu Apr 28 19:59:59 EDT 2016
awk: fix mkfile for cross-compiles (thanks, spew)
--- a/sys/src/cmd/awk/mkfile
+++ b/sys/src/cmd/awk/mkfile
@@ -1,5 +1,7 @@
</$objtype/mkfile
+cpuobjtype=`{sed -n 's/^O=//p' /$cputype/mkfile}
+
TARG=awk
OFILES=re.$O\
lex.$O\
@@ -39,10 +41,10 @@
nuke:V:
rm -f *.[$OS] [$OS].out [$OS].maketab y.tab.? y.debug y.output awkgram.c proctab.c $TARG
-proctab.c: $O.maketab
- ./$O.maketab >proctab.c
+proctab.c: $cpuobjtype.maketab
+ ./$cpuobjtype.maketab >proctab.c
-$O.maketab: y.tab.h maketab.c
+$cpuobjtype.maketab: y.tab.h maketab.c
objtype=$cputype
mk maketab.$cputype