shithub: riscv

Download patch

ref: 4afb56f570b3d6943e39bda5c9a2992a3bd139d2
parent: 96525edaae6e1fb076b4286fdd41032dafff651c
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Dec 13 19:00:59 EST 2014

kernel: evaluate dependencies of bootfs.proto files for bootfs.paq

expand the list of files specified in bootfs.proto and use them
as dependencies to bootfs.paq rule. this way, bootfs.paq is
regenerated when the to be included files have been modified.

--- a/sys/src/9/port/portmkfile
+++ b/sys/src/9/port/portmkfile
@@ -91,9 +91,12 @@
 boot$CONF.out: $CONF printstub.$O $BOOTLIB 
 	$BOOTDIR/mkboot $CONF > boot$CONF.c
 	$CC $CFLAGS boot$CONF.c
-	$LD -o boot$CONF.out boot$CONF.$O printstub.$O $BOOTLIB 
+	$LD -o boot$CONF.out boot$CONF.$O printstub.$O $BOOTLIB
 
-bootfs.paq:	../port/bootfs.proto
+bootfs.paq:	../port/bootfs.proto \
+		`{disk/mkfs -s / -ax ../port/bootfs.proto >[2]/dev/null \
+			| awk '/^end of archive/{exit}{print $1}' \
+			| while(x=`{read}){test -f $x && echo $x}}
 	mkdir -p bootfs
 	disk/mkfs -s / -d bootfs ../port/bootfs.proto
 	@{