-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPrepareRelease
executable file
·97 lines (74 loc) · 2.43 KB
/
PrepareRelease
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
#/bin/sh
# Script to prepare the files for building a B2PF release. It does some
# processing of the documentation, detrails files, and creates b2pf.h.generic
# and config.h.generic (for use by builders who can't run ./configure).
# You must run this script before runnning "make dist". If its first argument
# is "doc", it stops after preparing the documentation. There are no other
# arguments. The script makes use of the following files:
# 132html A Perl script that converts a .1 or .3 man page into HTML. It
# "knows" the relevant troff constructs that are used in the B2PF
# man pages.
# CheckMan A Perl script that checks man pages for typos in the mark up.
# Detrail A Perl script that removes trailing spaces from files.
# doc/index.html.src
# A file that is copied as index.html into the doc/html directory
# when the HTML documentation is built. It works like this so that
# doc/html can be deleted and re-created from scratch.
# README This file is copied into the doc/html directory, with a .txt
# extension, so that it can by hyperlinked from the HTML
# documentation, because some people just go to the HTML without
# looking for text files.
# First, sort out the documentation.
cd doc
echo Processing documentation
# Check the man pages
perl ../CheckMan *.1 *.3
if [ $? != 0 ] ; then exit 1; fi
# Make HTML form of the documentation.
echo "Making HTML documentation"
/bin/rm html/*
cp index.html.src html/index.html
cp ../README html/README.txt
for file in *.1 ; do
base=`basename $file .1`
echo " Making $base.html"
perl ../132html -toc $base <$file >html/$base.html
done
for file in *.3 ; do
base=`basename $file .3`
echo " Making $base.html"
perl ../132html -toc $base <$file >html/$base.html
done
# End of documentation processing; stop if only documentation required.
cd ..
echo Documentation done
if [ "$1" = "doc" ] ; then exit; fi
# These files are detrailed.
files="\
Makefile.am \
configure.ac \
README \
LICENCE \
COPYING \
AUTHORS \
NEWS \
INSTALL \
132html \
Detrail \
ChangeLog \
RunTest \
b2pf-config.in \
libb2pf.pc.in \
src/b2pf.c \
src/b2pf.h.in \
src/b2pf_context.c \
src/b2pf_error.c \
src/b2pf_format.c \
src/b2pf_internal.h \
src/b2pf_tree.c \
src/b2pf_valid_utf.c \
src/b2pftest.c"
echo Detrailing
perl ./Detrail $files doc/b* doc/html/*
echo Done
#End