Blob
1 MKSHELL=rc2 new-%:V:3 t=$stem4 if(! ~ $t utf fmt bio regexp mk){5 echo bad target6 exit oops7 }8 if(! ~ $t mk)9 t=lib$t10 mkdir -p $t11 rm -f $t/*12 cd $t13 mk -f ../mkfile.$stem14 cd ..16 test-%:V:17 t=$stem18 path=($PLAN9/bin $path)19 mk new-$t20 cd $t21 switch($t){22 case bio; d=libbio23 case regexp; d=libregexp24 case fmt; d=lib9/fmt25 case utf: d=lib9/utf26 case mk; d=cmd/mk27 }28 d=$PLAN9/src/$d29 for(i in `{ls -p $d/*.c})30 if(! test -f $i)31 echo XXX missing $i32 make33 for(i in `{ls *.c})34 if(! test -f `{echo $i | sed 's/.c$/.o/'})35 echo XXX not building $i36 cd ..37 rm -r $t39 lib%.tgz:V:40 mk new-$stem41 tar cf - lib$stem | gzip > $target43 libregexp9.tgz:V:44 mk new-regexp45 tar cf - libregexp | gzip >$target47 mk.tgz:V:48 mk new-mk49 tar cf - mk | gzip > $target51 mk-with-libs.tgz:V:52 mk new-utf53 mk new-fmt54 mk new-bio55 mk new-regexp56 mk new-mk57 rm -rf zot58 mkdir zot59 mv libutf libfmt libbio libregexp mk zot60 mv zot mk61 cp Makefile mk/Makefile62 tar cf - mk | gzip > $target63 rm -r mk65 tgz:V: libutf.tgz libfmt.tgz libregexp9.tgz libbio.tgz mk.tgz mk-with-libs.tgz67 push:68 rsync -e ssh -t *.tgz swtch:www/swtch.com/plan9port/unix69 ssh swtch rm -f www/swtch.com/plan9port/unix/*.sha1 \70 www/swtch.com/plan9port/unix/*.md5