plan9port/unix/mkfile
Russ Cox 88a87fadae all: update for new MIT license
On March 23, 2021, Nokia transferred the copyrights in the Plan 9 software
to the Plan 9 Foundation, which relicensed them under the MIT license.

This commit updates the Plan 9 from User Space license to reflect the
new base license. The vast majority of the contributions beyond the
base Plan 9 set were by me, many of them explicitly under an MIT license.
Those are all under the new MIT license now as well.

The port of mk to Unix was taken from Inferno via Vita Nuova and had
been made available under GPL, but Vita Nuova has relicensed Inferno
under the MIT license as well, to match the new Plan 9 license.

Michael Teichgraber contributed src/lib9/zoneinfo.c explicitly under
the Lucent Public License but has agreed to change the contribution
to the MIT license now used in the rest of the distribution.

There remain a few exceptions, most notably fonts.
See the root LICENSE file for full details.

The only mention of the Lucent Public License in the whole tree now
is in the LICENSE file, explaining the history.
2021-03-23 20:59:23 -04:00

74 lines
1.4 KiB
Makefile

MKSHELL=$PLAN9/bin/rc
new-%:V:
t=$stem
if(! ~ $t utf fmt bio regexp mk){
echo bad target
exit oops
}
if(! ~ $t mk)
t=lib$t
mkdir -p $t
rm -f $t/*
cd $t
mk -f ../mkfile.$stem
cd ..
test-%:V:
t=$stem
path=($PLAN9/bin $path)
mk new-$t
switch($t){
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
}
cd $td
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 ..
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
lib%.tgz:V:
mk new-$stem
tar cf /dev/stdout lib$stem | gzip > $target
libregexp9.tgz:V:
mk new-regexp
tar cf /dev/stdout libregexp | gzip >$target
mk.tgz:V:
mk new-mk
tar cf /dev/stdout mk | gzip > $target
mk-with-libs.tgz:V:
mk new-utf
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
cp make/Makefile.all mk/Makefile
tar cf /dev/stdout mk | gzip > $target
rm -r mk
tgz:V: libutf.tgz libfmt.tgz libregexp9.tgz libbio.tgz mk.tgz mk-with-libs.tgz
# run from 'mk push' in ../dist, which sets 9fansweb
push:V:
cp *.tgz $9fansweb/plan9port/unix