blob: 385173bb9f58d2739de9c6827d2b5fa45de2d894 (
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
|
#!/bin/sh
#
# Simple script to repopulate the 'doc' tree from
# the mdoc man pages stored in each project.
#
# Remove existing manpages from the doc tree
chmod -R +w man text
rm -f man/*.[135]
rm -f text/*.[135]
# Build Makefile in 'man' directory
cd man
echo > Makefile
echo "default: all" >>Makefile
echo >>Makefile
all="all:"
for d in libarchive tar cpio; do
for f in ../../$d/*.[135]; do
echo >> Makefile
echo `basename $f`: ../mdoc2man.awk $f >> Makefile
echo " awk -f ../mdoc2man.awk < $f > `basename $f`" >> Makefile
all="$all `basename $f`"
done
done
echo $all >>Makefile
cd ..
# Rebuild Makefile in 'text' directory
cd text
echo > Makefile
echo "$all" >>Makefile
echo >>Makefile
for d in libarchive tar cpio; do
for f in ../../$d/*.[135]; do
echo >> Makefile
echo `basename $f`: $f >> Makefile
echo " nroff -mdoc $f | col -b > `basename $f`" >> Makefile
done
done
cd ..
# Rebuild Makefile in 'pdf' directory
cd pdf
echo > Makefile
echo "default: all" >>Makefile
echo >>Makefile
all="all:"
for d in libarchive tar cpio; do
for f in ../../$d/*.[135]; do
echo >> Makefile
echo `basename $f`.pdf: $f >> Makefile
echo " groff -mdoc -T ps $f | ps2pdf - - > `basename $f`.pdf" >> Makefile
all="$all `basename $f`.pdf"
done
done
echo $all >>Makefile
cd ..
# Convert all of the manpages to -man format.
(cd man && make)
# Format all of the manpages to text
(cd text && make)
# Format all of the manpages in PDF directory.
(cd pdf && make)
|