2008-01-10 21:08:44 +00:00
|
|
|
MKSHELL=$PLAN9/bin/rc
|
2005-01-14 03:45:44 +00:00
|
|
|
new-%:V:
|
|
|
|
t=$stem
|
|
|
|
if(! ~ $t utf fmt bio regexp mk){
|
|
|
|
echo bad target
|
|
|
|
exit oops
|
|
|
|
}
|
|
|
|
if(! ~ $t mk)
|
|
|
|
t=lib$t
|
2004-12-28 23:27:43 +00:00
|
|
|
mkdir -p $t
|
2005-01-14 03:45:44 +00:00
|
|
|
rm -f $t/*
|
2004-03-01 19:36:29 +00:00
|
|
|
cd $t
|
2005-01-14 03:45:44 +00:00
|
|
|
mk -f ../mkfile.$stem
|
2004-03-01 19:36:29 +00:00
|
|
|
cd ..
|
2004-12-28 23:27:43 +00:00
|
|
|
|
2005-01-14 03:45:44 +00:00
|
|
|
test-%:V:
|
|
|
|
t=$stem
|
|
|
|
path=($PLAN9/bin $path)
|
|
|
|
mk new-$t
|
|
|
|
switch($t){
|
2008-07-20 10:17:17 +00:00
|
|
|
case bio; d=libbio; td=libbio
|
|
|
|
case regexp; d=libregexp; td=libregexp
|
|
|
|
case fmt; d=lib9/fmt; td=libfmt
|
|
|
|
case utf; d=lib9/utf; td=libutf
|
|
|
|
case mk; d=cmd/mk; td=mk
|
2005-01-14 03:45:44 +00:00
|
|
|
}
|
2008-07-20 10:17:17 +00:00
|
|
|
cd $td
|
2005-01-14 03:45:44 +00:00
|
|
|
d=$PLAN9/src/$d
|
|
|
|
for(i in `{ls -p $d/*.c})
|
|
|
|
if(! test -f $i)
|
|
|
|
echo XXX missing $i
|
|
|
|
make
|
|
|
|
for(i in `{ls *.c})
|
|
|
|
if(! test -f `{echo $i | sed 's/.c$/.o/'})
|
|
|
|
echo XXX not building $i
|
|
|
|
cd ..
|
2021-03-23 21:24:35 +00:00
|
|
|
|
|
|
|
test:V: test-utf test-fmt test-bio test-regexp test-mk
|
|
|
|
mk test-clean
|
|
|
|
|
|
|
|
test-clean:V:
|
|
|
|
rm -rf libutf libfmt libbio libregexp mk
|
2004-12-28 23:27:43 +00:00
|
|
|
|
2005-01-14 03:45:44 +00:00
|
|
|
lib%.tgz:V:
|
|
|
|
mk new-$stem
|
2018-11-16 15:14:02 +00:00
|
|
|
tar cf /dev/stdout lib$stem | gzip > $target
|
2004-03-01 19:36:29 +00:00
|
|
|
|
2005-01-14 03:45:44 +00:00
|
|
|
libregexp9.tgz:V:
|
|
|
|
mk new-regexp
|
2018-11-16 15:14:02 +00:00
|
|
|
tar cf /dev/stdout libregexp | gzip >$target
|
2004-03-01 19:36:29 +00:00
|
|
|
|
2005-01-14 03:45:44 +00:00
|
|
|
mk.tgz:V:
|
|
|
|
mk new-mk
|
2018-11-16 15:14:02 +00:00
|
|
|
tar cf /dev/stdout mk | gzip > $target
|
2004-03-01 19:36:29 +00:00
|
|
|
|
2005-01-14 03:45:44 +00:00
|
|
|
mk-with-libs.tgz:V:
|
2021-03-23 21:24:35 +00:00
|
|
|
mk new-utf
|
2005-01-14 03:45:44 +00:00
|
|
|
mk new-fmt
|
|
|
|
mk new-bio
|
|
|
|
mk new-regexp
|
|
|
|
mk new-mk
|
|
|
|
rm -rf zot
|
|
|
|
mkdir zot
|
|
|
|
mv libutf libfmt libbio libregexp mk zot
|
|
|
|
mv zot mk
|
2009-08-24 14:53:01 +00:00
|
|
|
cp make/Makefile.all mk/Makefile
|
2018-11-16 15:14:02 +00:00
|
|
|
tar cf /dev/stdout mk | gzip > $target
|
2005-01-14 03:45:44 +00:00
|
|
|
rm -r mk
|
|
|
|
|
|
|
|
tgz:V: libutf.tgz libfmt.tgz libregexp9.tgz libbio.tgz mk.tgz mk-with-libs.tgz
|
|
|
|
|
2021-03-23 21:24:35 +00:00
|
|
|
# run from 'mk push' in ../dist, which sets 9fansweb
|
2017-09-01 17:16:43 +00:00
|
|
|
push:V:
|
|
|
|
cp *.tgz $9fansweb/plan9port/unix
|