git: 9front

Download patch

ref: a822b3af100dbe99d7603ce168627c5af155848f
parent: 936e8478e2ede40ba45ac436a224c6e5ee59fe95
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
 	@{
--