shithub: riscv

Download patch

ref: d4abe404b4ad9a7c913bde37d211be614f27c965
parent: 0df733f94b8bc11946b0af940d30f28ca67f02d8
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Mar 24 15:00:34 EDT 2014

pc64: prevent dat.h from getting overwritten by ../pc/dat.h

the rule that was used to copy header files from ../pc
accidently overwrote dat.h when ../pc/dat.h was updated
because it matched on all *.h files that was also found
in ../pc directory. change to exact match on $PCHEADERS
to prevent this.

--- a/sys/src/9/pc64/mkfile
+++ b/sys/src/9/pc64/mkfile
@@ -85,11 +85,12 @@
 # copies generated by the rule below
 PCHEADERS=wifi.h uncached.h usbehci.h screen.h etherif.h ethermii.h mp.h io.h ahci.h
 
-&.h:	../pc/&.h
+REPCH=`{echo $PCHEADERS | sed 's/\.h//g; s/ /|/g'}
+^($REPCH)\.h:R:	'../pc/\1.h'
 	cp $prereq .
 
-PCFILES=`{../port/mkfilelist ../pc}
-^($PCFILES)\.$O:R:	'../pc/\1.c'
+REPCC=`{../port/mkfilelist ../pc}
+^($REPCC)\.$O:R:	'../pc/\1.c'
 	$CC $CFLAGS -I. -. ../pc/$stem1.c
 
 <../boot/bootmkfile