| 4 |
# processing of the documentation, detrails files, and creates pcre.h.generic |
# processing of the documentation, detrails files, and creates pcre.h.generic |
| 5 |
# and config.h.generic (for use by builders who can't run ./configure). |
# and config.h.generic (for use by builders who can't run ./configure). |
| 6 |
|
|
| 7 |
# You must run this script before runnning "make dist". It makes use of the |
# You must run this script before runnning "make dist". If its first argument |
| 8 |
# following files: |
# is "doc", it stops after preparing the documentation. There are no other |
| 9 |
|
# arguments. The script makes use of the following files: |
| 10 |
|
|
| 11 |
# 132html A Perl script that converts a .1 or .3 man page into HTML. It |
# 132html A Perl script that converts a .1 or .3 man page into HTML. It |
| 12 |
# is called from MakeRelease. It "knows" the relevant troff |
# "knows" the relevant troff constructs that are used in the PCRE |
| 13 |
# constructs that are used in the PCRE man pages. |
# man pages. |
| 14 |
|
|
| 15 |
|
# CheckMan A Perl script that checks man pages for typos in the mark up. |
| 16 |
|
|
| 17 |
# CleanTxt A Perl script that cleans up the output of "nroff -man" by |
# CleanTxt A Perl script that cleans up the output of "nroff -man" by |
| 18 |
# removing backspaces and other redundant text so as to produce |
# removing backspaces and other redundant text so as to produce |
| 26 |
# doc/html can be deleted and re-created from scratch. |
# doc/html can be deleted and re-created from scratch. |
| 27 |
|
|
| 28 |
|
|
| 29 |
# First, sort out the documentation |
# First, sort out the documentation. Remove pcredemo.3 first because it won't |
| 30 |
|
# pass the markup check (it is created below, using markup that none of the |
| 31 |
|
# other pages use). |
| 32 |
|
|
| 33 |
cd doc |
cd doc |
| 34 |
echo Processing documentation |
echo Processing documentation |
| 35 |
|
|
| 36 |
|
/bin/rm -f pcredemo.3 |
| 37 |
|
|
| 38 |
|
# Check the remaining man pages |
| 39 |
|
|
| 40 |
|
../CheckMan *.1 *.3 |
| 41 |
|
if [ $? != 0 ] ; then exit 1; fi |
| 42 |
|
|
| 43 |
# Make Text form of the documentation. It needs some mangling to make it |
# Make Text form of the documentation. It needs some mangling to make it |
| 44 |
# tidy for online reading. Concatenate all the .3 stuff, but omit the |
# tidy for online reading. Concatenate all the .3 stuff, but omit the |
| 45 |
# individual function pages. |
# individual function pages. |
| 49 |
This file contains a concatenation of the PCRE man pages, converted to plain |
This file contains a concatenation of the PCRE man pages, converted to plain |
| 50 |
text format for ease of searching with a text editor, or for use on systems |
text format for ease of searching with a text editor, or for use on systems |
| 51 |
that do not have a man page processor. The small individual files that give |
that do not have a man page processor. The small individual files that give |
| 52 |
synopses of each function in the library have not been included. There are |
synopses of each function in the library have not been included. Neither has |
| 53 |
separate text files for the pcregrep and pcretest commands. |
the pcredemo program. There are separate text files for the pcregrep and |
| 54 |
|
pcretest commands. |
| 55 |
----------------------------------------------------------------------------- |
----------------------------------------------------------------------------- |
| 56 |
|
|
| 57 |
|
|
| 81 |
done |
done |
| 82 |
|
|
| 83 |
|
|
| 84 |
|
# Make pcredemo.3 from the pcredemo.c source file |
| 85 |
|
|
| 86 |
|
echo "Making pcredemo.3" |
| 87 |
|
perl <<"END" >pcredemo.3 |
| 88 |
|
open(IN, "../pcredemo.c") || die "Failed to open pcredemo.c\n"; |
| 89 |
|
open(OUT, ">pcredemo.3") || die "Failed to open pcredemo.3\n"; |
| 90 |
|
print OUT ".\\\" Start example.\n" . |
| 91 |
|
".de EX\n" . |
| 92 |
|
". nr mE \\\\n(.f\n" . |
| 93 |
|
". nf\n" . |
| 94 |
|
". nh\n" . |
| 95 |
|
". ft CW\n" . |
| 96 |
|
"..\n" . |
| 97 |
|
".\n" . |
| 98 |
|
".\n" . |
| 99 |
|
".\\\" End example.\n" . |
| 100 |
|
".de EE\n" . |
| 101 |
|
". ft \\\\n(mE\n" . |
| 102 |
|
". fi\n" . |
| 103 |
|
". hy \\\\n(HY\n" . |
| 104 |
|
"..\n" . |
| 105 |
|
".\n" . |
| 106 |
|
".EX\n" ; |
| 107 |
|
while (<IN>) |
| 108 |
|
{ |
| 109 |
|
s/\\/\\e/g; |
| 110 |
|
print OUT; |
| 111 |
|
} |
| 112 |
|
print OUT ".EE\n"; |
| 113 |
|
close(IN); |
| 114 |
|
close(OUT); |
| 115 |
|
END |
| 116 |
|
if [ $? != 0 ] ; then exit 1; fi |
| 117 |
|
|
| 118 |
|
|
| 119 |
# Make HTML form of the documentation. |
# Make HTML form of the documentation. |
| 120 |
|
|
| 121 |
echo "Making HTML documentation" |
echo "Making HTML documentation" |
| 131 |
# Exclude table of contents for function summaries. It seems that expr |
# Exclude table of contents for function summaries. It seems that expr |
| 132 |
# forces an anchored regex. Also exclude them for small pages that have |
# forces an anchored regex. Also exclude them for small pages that have |
| 133 |
# only one section. |
# only one section. |
| 134 |
|
|
| 135 |
for file in *.3 ; do |
for file in *.3 ; do |
| 136 |
base=`basename $file .3` |
base=`basename $file .3` |
| 137 |
toc=-toc |
toc=-toc |
| 147 |
if [ $? != 0 ] ; then exit 1; fi |
if [ $? != 0 ] ; then exit 1; fi |
| 148 |
done |
done |
| 149 |
|
|
| 150 |
# End of documentation processing |
# End of documentation processing; stop if only documentation required. |
| 151 |
|
|
| 152 |
cd .. |
cd .. |
| 153 |
echo Documentation done |
echo Documentation done |
| 154 |
|
if [ "$1" = "doc" ] ; then exit; fi |
| 155 |
|
|
| 156 |
# These files are detrailed; do not detrail the test data because there may be |
# These files are detrailed; do not detrail the test data because there may be |
| 157 |
# significant trailing spaces. The configure files are also omitted from the |
# significant trailing spaces. The configure files are also omitted from the |
| 178 |
RunTest.bat \ |
RunTest.bat \ |
| 179 |
pcre-config.in \ |
pcre-config.in \ |
| 180 |
libpcre.pc.in \ |
libpcre.pc.in \ |
| 181 |
|
libpcreposix.pc.in \ |
| 182 |
libpcrecpp.pc.in \ |
libpcrecpp.pc.in \ |
|
config.h \ |
|
| 183 |
config.h.in \ |
config.h.in \ |
| 184 |
pcre_printint.src \ |
pcre_printint.src \ |
| 185 |
pcre_chartables.c.dist \ |
pcre_chartables.c.dist \ |