aboutsummaryrefslogtreecommitdiff
path: root/unix/mkfile
blob: 58b86e54fc1a9131c1c2a3d9b8675efd95dad4ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
bio fmt mk regexp utf:V:
	case $target in
	mk) t=mk ;;
	regexp) t=libregexp ;;
	*) t=lib$target ;;
	esac
	# 
	mkdir -p $t
	rm -f $t/* || true
	cd $t
	mk -f ../mkfile.$target
	# 
	case $target in
	bio) d=$PLAN9/src/$t;;
	regexp) d=$PLAN9/src/$t;;
	fmt) d=$PLAN9/src/lib9/$target ;;
	utf) d=$PLAN9/src/lib9/$target ;;
	mk) d=$PLAN9/src/cmd/mk ;;
	esac
	# 
	for i in `ls -p $d/*.c`
	do
		if [ ! -f $i ]
		then
			echo missing $i
		fi
	done
	make
	for i in `ls *.c`
	do
		if [ ! -f `echo $i | sed 's/.c$/.o/'` ]
		then
			echo not building $i
		fi
	done
	cd ..
	rm $t/* || true
	cd $t
	mk -f ../mkfile.$target

%.install:V:
	mk $stem
	case $stem in
	mk) t=mk ;;
	regexp) t=libregexp ;;
	*) t=lib$stem ;;
	esac
	(cd $t; make install)

lib%.tgz:
	mk $stem
	tar cf - lib$stem |gzip >lib$stem.tgz

libregexp9.tgz:
	mk regexp
	tar cf - libregexp | gzip >libregexp9.tgz

mk.tgz:
	mk mk
	tar cf - mk | gzip >mk.tgz

mk-all.tgz:
	tar cf - Makefile libutf libfmt libbio libregexp mk | gzip >mk-all.tgz