blob: cf2b0bdc739bb09009c2ae77a0293bae93ab4302 (
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
</$objtype/mkfile
BIN=/$objtype/bin/fossil
TARG=fossil flchk flfmt conf last
LIBFILES=\
9p\
9auth\
9dir\
9excl\
9fid\
9fsys\
9lstn\
9proc\
9srv\
9user\
Ccmd\
Ccli\
Ccons\
Clog\
archive\
nobwatch\
cache\
check\
disk\
error\
file\
fs\
pack\
periodic\
source\
vac\
walk\
LIBCFILES=${LIBFILES:%=%.c}
LIBOFILES=${LIBFILES:%=%.$O}
LIB=libfs.a$O
HFILES=\
/sys/include/oventi.h\
stdinc.h\
vac.h\
dat.h\
fns.h\
fs.h\
error.h\
9.h\
flfmt9660.h\
CFILES=${TARG:%=%.c} $LIBCFILES flfmt9660.c
UPDATE=\
mkfile\
$CFILES\
$HFILES\
default:V: all
test:V: all
rm -f /srv/test.fossil /srv/test.fscons
slay 8.flfmt | rc
slay 8.fossil | rc
unmount /n/fossil || status=''
{syscall seek 1 6400000000 0; echo} >>/tmp/fossil
8.flfmt -y /tmp/fossil
8.conf -w /tmp/fossil flproto
8.fossil -f /tmp/fossil
cat /srv/test.fscons &
echo fsys main >>/srv/test.fscons
mount /srv/test.fossil /n/fossil
cd /n/fossil/tmp
dd -bs 1048576 -count 256 -if /dev/zero -of a
rm a
echo sync >>/srv/test.fscons
echo sync >>/srv/test.fscons
echo sync >>/srv/test.fscons
sleep 1
echo sync >>/srv/test.fscons
sleep 1
echo sync >>/srv/test.fscons
sleep 1
echo sync >>/srv/test.fscons
echo check >>/srv/test.fscons
echo check >>/srv/test.fscons
echo check >>/srv/test.fscons
# cp /env/timezone /n/fossil/tmp
# cp /lib/words /n/fossil/tmp
# dircp /n/sources/plan9/sys/src/cmd/aux /n/fossil/tmp
# >/n/fossil/tmp/lis
# chmod +t /n/fossil/tmp/lis
# echo SHOULD NOT SEE THIS >>/n/fossil/tmp/lis
# echo snap >>/srv/test.fscons
# sleep 2
# mount /srv/test.fossil /n/dump main/archive
# cat /n/dump/*/*/tmp/lis
# @{cd /n/fossil/tmp && time tar xTf /sys/src/cmd/fossil/test.tar}
# unmount /n/fossil
# rm /srv/fossil
</sys/src/cmd/mkmany
$LIB(%.$O):N: %.$O
$LIB: ${LIBOFILES:%=$LIB(%)}
names = `{echo $newprereq |sed 's/ /\n/g' |sed -n 's/'$LIB'\(([^)]+)\)/\1/gp'}
ar vu $LIB $names
# rm $names
$O.flfmt: flfmt9660.$O
flfmt%.$O: flfmt9660.h
%.page:V: %.ps
page -w $stem.ps
%.ps:D: %.ms
tbl $stem.ms | pic | eqn | troff -ms | lp -dstdout >$target
bundle:V:
rfork n
ramfs -m /n/kremvax >[2]/dev/null
bind -a /n/kremvax .
cp /sys/doc/fossil.ms /sys/doc/fossil.ps /n/kremvax
cp /sys/man/4/fossil /n/kremvax/fossil.4.man
cp /sys/man/8/fossilcons /n/kremvax/fossilcons.8.man
x=`{ls |grep -v 'TODO|test.tar|fossil.tar.gz'}
tar c $x | gzip > fossil.tar.gz
$O.conf:D: conf.rc
{
echo '#!/bin/rc'
echo '# THIS FILE IS AUTOMATICALLY GENERATED'
echo '# FROM /sys/src/cmd/fossil/conf.rc. DO NOT EDIT.'
echo
sed 1d conf.rc
} >$target && chmod +x $target
|