/[pcre]/code/trunk/PrepareRelease
ViewVC logotype

Contents of /code/trunk/PrepareRelease

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1335 - (hide annotations) (download)
Tue May 28 09:13:59 2013 UTC (3 weeks, 1 day ago) by ph10
File size: 7311 byte(s)
Final source file tidies for 8.33 release.

1 ph10 97 #/bin/sh
2    
3 ph10 111 # Script to prepare the files for building a PCRE release. It does some
4     # 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).
6 ph10 97
7 ph10 453 # You must run this script before runnning "make dist". If its first argument
8     # is "doc", it stops after preparing the documentation. There are no other
9     # arguments. The script makes use of the following files:
10 ph10 97
11 ph10 111 # 132html A Perl script that converts a .1 or .3 man page into HTML. It
12 ph10 429 # "knows" the relevant troff constructs that are used in the PCRE
13     # man pages.
14 ph10 97
15 ph10 583 # CheckMan A Perl script that checks man pages for typos in the mark up.
16    
17 ph10 111 # CleanTxt A Perl script that cleans up the output of "nroff -man" by
18     # removing backspaces and other redundant text so as to produce
19     # a readable .txt file.
20 ph10 97
21 ph10 111 # Detrail A Perl script that removes trailing spaces from files.
22 ph10 97
23 ph10 128 # doc/index.html.src
24 ph10 127 # A file that is copied as index.html into the doc/html directory
25     # when the HTML documentation is built. It works like this so that
26     # doc/html can be deleted and re-created from scratch.
27 ph10 97
28 ph10 1332 # README & NON-AUTOTOOLS-BUILD
29     # These files are copied into the doc/html directory, with .txt
30     # extensions so that they can by hyperlinked from the HTML
31     # documentation, because some people just go to the HTML without
32     # looking for text files.
33 ph10 97
34 ph10 1332
35 ph10 583 # First, sort out the documentation. Remove pcredemo.3 first because it won't
36     # pass the markup check (it is created below, using markup that none of the
37     # other pages use).
38 ph10 97
39     cd doc
40     echo Processing documentation
41    
42 ph10 583 /bin/rm -f pcredemo.3
43    
44     # Check the remaining man pages
45    
46 ph10 836 perl ../CheckMan *.1 *.3
47 ph10 583 if [ $? != 0 ] ; then exit 1; fi
48    
49 ph10 97 # Make Text form of the documentation. It needs some mangling to make it
50     # tidy for online reading. Concatenate all the .3 stuff, but omit the
51     # individual function pages.
52    
53     cat <<End >pcre.txt
54     -----------------------------------------------------------------------------
55     This file contains a concatenation of the PCRE man pages, converted to plain
56     text format for ease of searching with a text editor, or for use on systems
57     that do not have a man page processor. The small individual files that give
58 ph10 678 synopses of each function in the library have not been included. Neither has
59 ph10 429 the pcredemo program. There are separate text files for the pcregrep and
60     pcretest commands.
61 ph10 97 -----------------------------------------------------------------------------
62    
63    
64     End
65    
66     echo "Making pcre.txt"
67 chpe 1055 for file in pcre pcre16 pcre32 pcrebuild pcrematching pcreapi pcrecallout \
68 ph10 1221 pcrecompat pcrepattern pcresyntax pcreunicode pcrejit pcrepartial \
69 ph10 678 pcreprecompile pcreperform pcreposix pcrecpp pcresample \
70     pcrelimits pcrestack ; do
71 ph10 97 echo " Processing $file.3"
72     nroff -c -man $file.3 >$file.rawtxt
73 ph10 836 perl ../CleanTxt <$file.rawtxt >>pcre.txt
74 ph10 97 /bin/rm $file.rawtxt
75     echo "------------------------------------------------------------------------------" >>pcre.txt
76     if [ "$file" != "pcresample" ] ; then
77     echo " " >>pcre.txt
78     echo " " >>pcre.txt
79     fi
80     done
81    
82 ph10 153 # The three commands
83     for file in pcretest pcregrep pcre-config ; do
84 ph10 97 echo Making $file.txt
85     nroff -c -man $file.1 >$file.rawtxt
86 ph10 836 perl ../CleanTxt <$file.rawtxt >$file.txt
87 ph10 97 /bin/rm $file.rawtxt
88     done
89    
90    
91 ph10 429 # Make pcredemo.3 from the pcredemo.c source file
92    
93     echo "Making pcredemo.3"
94     perl <<"END" >pcredemo.3
95     open(IN, "../pcredemo.c") || die "Failed to open pcredemo.c\n";
96     open(OUT, ">pcredemo.3") || die "Failed to open pcredemo.3\n";
97     print OUT ".\\\" Start example.\n" .
98     ".de EX\n" .
99     ". nr mE \\\\n(.f\n" .
100     ". nf\n" .
101     ". nh\n" .
102     ". ft CW\n" .
103     "..\n" .
104     ".\n" .
105     ".\n" .
106     ".\\\" End example.\n" .
107     ".de EE\n" .
108     ". ft \\\\n(mE\n" .
109     ". fi\n" .
110     ". hy \\\\n(HY\n" .
111     "..\n" .
112     ".\n" .
113 ph10 678 ".EX\n" ;
114 ph10 429 while (<IN>)
115     {
116     s/\\/\\e/g;
117     print OUT;
118     }
119     print OUT ".EE\n";
120     close(IN);
121 ph10 678 close(OUT);
122 ph10 429 END
123     if [ $? != 0 ] ; then exit 1; fi
124    
125    
126 ph10 97 # Make HTML form of the documentation.
127    
128 ph10 111 echo "Making HTML documentation"
129 ph10 97 /bin/rm html/*
130 ph10 127 cp index.html.src html/index.html
131 ph10 1332 cp ../README html/README.txt
132     cp ../NON-AUTOTOOLS-BUILD html/NON-AUTOTOOLS-BUILD.txt
133 ph10 97
134     for file in *.1 ; do
135     base=`basename $file .1`
136 ph10 111 echo " Making $base.html"
137 ph10 836 perl ../132html -toc $base <$file >html/$base.html
138 ph10 97 done
139    
140     # Exclude table of contents for function summaries. It seems that expr
141     # forces an anchored regex. Also exclude them for small pages that have
142     # only one section.
143 ph10 453
144 ph10 97 for file in *.3 ; do
145     base=`basename $file .3`
146     toc=-toc
147     if [ `expr $base : '.*_'` -ne 0 ] ; then toc="" ; fi
148 ph10 678 if [ "$base" = "pcresample" ] || \
149     [ "$base" = "pcrestack" ] || \
150     [ "$base" = "pcrecompat" ] || \
151     [ "$base" = "pcrelimits" ] || \
152     [ "$base" = "pcreperform" ] || \
153     [ "$base" = "pcreunicode" ] ; then
154 ph10 97 toc=""
155     fi
156 ph10 111 echo " Making $base.html"
157 ph10 836 perl ../132html $toc $base <$file >html/$base.html
158 ph10 111 if [ $? != 0 ] ; then exit 1; fi
159 ph10 97 done
160    
161 ph10 453 # End of documentation processing; stop if only documentation required.
162 ph10 97
163     cd ..
164     echo Documentation done
165 ph10 453 if [ "$1" = "doc" ] ; then exit; fi
166 ph10 97
167 ph10 111 # These files are detrailed; do not detrail the test data because there may be
168 ph10 709 # significant trailing spaces. Do not detrail RunTest.bat, because it has CRLF
169     # line endings and the detrail script removes all trailing white space. The
170 ph10 840 # configure files are also omitted from the detrailing. We don't bother with
171 chpe 1055 # those pcre[16|32]_xx files that just define COMPILE_PCRE16 and then #include the
172 ph10 840 # common file, because they aren't going to change.
173 ph10 97
174 ph10 111 files="\
175     Makefile.am \
176     Makefile.in \
177     configure.ac \
178     README \
179     LICENCE \
180     COPYING \
181     AUTHORS \
182     NEWS \
183     NON-UNIX-USE \
184 ph10 981 NON-AUTOTOOLS-BUILD \
185 ph10 111 INSTALL \
186     132html \
187     CleanTxt \
188     Detrail \
189     ChangeLog \
190     CMakeLists.txt \
191 ph10 138 RunGrepTest \
192     RunTest \
193 ph10 97 pcre-config.in \
194     libpcre.pc.in \
195 ph10 840 libpcre16.pc.in \
196 chpe 1055 libpcre32.pc.in \
197 ph10 423 libpcreposix.pc.in \
198 ph10 97 libpcrecpp.pc.in \
199 ph10 111 config.h.in \
200 ph10 128 pcre_chartables.c.dist \
201 ph10 97 pcredemo.c \
202     pcregrep.c \
203     pcretest.c \
204     dftables.c \
205     pcreposix.c \
206     pcreposix.h \
207 ph10 111 pcre.h.in \
208 ph10 1008 pcre_internal.h \
209 ph10 836 pcre_byte_order.c \
210 ph10 97 pcre_compile.c \
211     pcre_config.c \
212     pcre_dfa_exec.c \
213     pcre_exec.c \
214     pcre_fullinfo.c \
215     pcre_get.c \
216     pcre_globals.c \
217 ph10 683 pcre_jit_compile.c \
218 ph10 691 pcre_jit_test.c \
219 ph10 97 pcre_maketables.c \
220     pcre_newline.c \
221     pcre_ord2utf8.c \
222 ph10 842 pcre16_ord2utf16.c \
223 chpe 1055 pcre32_ord2utf32.c \
224 ph10 840 pcre_printint.c \
225 ph10 97 pcre_refcount.c \
226 ph10 842 pcre_string_utils.c \
227 ph10 97 pcre_study.c \
228     pcre_tables.c \
229     pcre_valid_utf8.c \
230     pcre_version.c \
231     pcre_xclass.c \
232 ph10 840 pcre16_utf16_utils.c \
233 chpe 1055 pcre32_utf32_utils.c \
234 ph10 842 pcre16_valid_utf16.c \
235 chpe 1055 pcre32_valid_utf32.c \
236 ph10 97 pcre_scanner.cc \
237     pcre_scanner.h \
238     pcre_scanner_unittest.cc \
239     pcrecpp.cc \
240     pcrecpp.h \
241     pcrecpparg.h.in \
242     pcrecpp_unittest.cc \
243     pcre_stringpiece.cc \
244     pcre_stringpiece.h.in \
245     pcre_stringpiece_unittest.cc \
246     perltest.pl \
247     ucp.h \
248     makevp.bat \
249     pcre.def \
250     libpcre.def \
251     libpcreposix.def"
252    
253     echo Detrailing
254 ph10 836 perl ./Detrail $files doc/p* doc/html/*
255 ph10 97
256 ph10 183 echo Done
257    
258 ph10 97 #End

Properties

Name Value
svn:executable *

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12