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

Diff of /code/trunk/PrepareRelease

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

code/trunk/maintain/MakeRelease revision 99 by ph10, Tue Mar 6 12:27:42 2007 UTC code/trunk/PrepareRelease revision 111 by ph10, Thu Mar 8 16:53:09 2007 UTC
# Line 1  Line 1 
1  #/bin/sh  #/bin/sh
2    
3  # Script to make a PCRE release  # 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  if [ ! "$1" ]; then  # and config.h.generic (for use by builders who can't run ./configure).
6    echo "*** Version number missing ***"  
7    exit 1  # You must run this script before runnning "make dist". It makes use of the
8  fi  # following files:
9    
10  # The name of the release directory  # 132html     A Perl script that converts a .1 or .3 man page into HTML. It
11    #             is called from MakeRelease. It "knows" the relevant troff
12  dir=pcre-$1  #             constructs that are used in the PCRE man pages.
13    
14  # But sometimes we just want to process the documentation  # CleanTxt    A Perl script that cleans up the output of "nroff -man" by
15    #             removing backspaces and other redundant text so as to produce
16  if [ "$1" = "doconly" ] ; then  #             a readable .txt file.
17    doconly=yes  
18  fi  # Detrail     A Perl script that removes trailing spaces from files.
19    
20    # Index.html  A file that is copied as index.html into the doc/html
21    #             directory when the HTML documentation is built. It works like
22    #             this so that doc/html can be deleted and re-created from scratch.
23    
24    
25  # First, sort out the documentation  # First, sort out the documentation
# Line 45  for file in pcre pcrebuild pcrematching Line 49  for file in pcre pcrebuild pcrematching
49              pcreperform pcreposix pcrecpp pcresample pcrestack ; do              pcreperform pcreposix pcrecpp pcresample pcrestack ; do
50    echo "  Processing $file.3"    echo "  Processing $file.3"
51    nroff -c -man $file.3 >$file.rawtxt    nroff -c -man $file.3 >$file.rawtxt
52    ../maintain/CleanTxt <$file.rawtxt >>pcre.txt    ../CleanTxt <$file.rawtxt >>pcre.txt
53    /bin/rm $file.rawtxt    /bin/rm $file.rawtxt
54    echo "------------------------------------------------------------------------------" >>pcre.txt    echo "------------------------------------------------------------------------------" >>pcre.txt
55    if [ "$file" != "pcresample" ] ; then    if [ "$file" != "pcresample" ] ; then
# Line 58  done Line 62  done
62  for file in pcretest pcregrep ; do  for file in pcretest pcregrep ; do
63    echo Making $file.txt    echo Making $file.txt
64    nroff -c -man $file.1 >$file.rawtxt    nroff -c -man $file.1 >$file.rawtxt
65    ../maintain/CleanTxt <$file.rawtxt >$file.txt    ../CleanTxt <$file.rawtxt >$file.txt
66    /bin/rm $file.rawtxt    /bin/rm $file.rawtxt
67  done  done
68    
69    
70  # Make HTML form of the documentation.  # Make HTML form of the documentation.
71    
72    echo "Making HTML documentation"
73  /bin/rm html/*  /bin/rm html/*
74  cp ../maintain/Index.html html/index.html  cp ../Index.html html/index.html
75    
76  for file in *.1 ; do  for file in *.1 ; do
77    base=`basename $file .1`    base=`basename $file .1`
78    echo Making $base.html    echo "  Making $base.html"
79    ../maintain/132html -toc $base <$file >html/$base.html    ../132html -toc $base <$file >html/$base.html
80  done  done
81    
82  # Exclude table of contents for function summaries. It seems that expr  # Exclude table of contents for function summaries. It seems that expr
# Line 87  for file in *.3 ; do Line 92  for file in *.3 ; do
92       [ "$base" = "pcreperform" ] ; then       [ "$base" = "pcreperform" ] ; then
93      toc=""      toc=""
94    fi    fi
95    echo Making $base.html    echo "  Making $base.html"
96    ../maintain/132html $toc $base <$file >html/$base.html    ../132html $toc $base <$file >html/$base.html
97    if [ $? != 0 ] ; then exit 1; fi    if [ $? != 0 ] ; then exit 1; fi
98  done  done
99    
100  # End of documentation processing  # End of documentation processing
# Line 97  done Line 102  done
102  cd ..  cd ..
103  echo Documentation done  echo Documentation done
104    
105  if [ "$doconly" = "yes" ] ; then  # These files are detrailed; do not detrail the test data because there may be
106    exit 0  # significant trailing spaces. The configure files are also omitted from the
107  fi  # detrailing.
108    
109  # These files are detrailed and copied; do not detrail the test data  files="\
110  # because there may be significant trailing spaces. The configure files    Makefile.am \
111  # are also omitted from the detrailing.    Makefile.in \
112      configure.ac \
113  files="Makefile.in configure.ac config.h.in \    README \
114    README LICENCE COPYING AUTHORS NEWS NON-UNIX-USE INSTALL ChangeLog \    LICENCE \
115      COPYING \
116      AUTHORS \
117      NEWS \
118      NON-UNIX-USE \
119      INSTALL \
120      132html \
121      CleanTxt \
122      Detrail \
123      ChangeLog \
124      CMakeLists.txt \
125      RunGrepTest.in \
126      RunTest.in \
127      RunTest.bat \
128    pcre-config.in \    pcre-config.in \
129    libpcre.pc.in \    libpcre.pc.in \
130    libpcrecpp.pc.in \    libpcrecpp.pc.in \
131      config.h \
132      config.h.in \
133    pcre_printint.src \    pcre_printint.src \
134    pcredemo.c \    pcredemo.c \
135    pcregrep.c \    pcregrep.c \
# Line 118  files="Makefile.in configure.ac config.h Line 138  files="Makefile.in configure.ac config.h
138    pcreposix.c \    pcreposix.c \
139    pcreposix.h \    pcreposix.h \
140    pcre.h \    pcre.h \
141      pcre.h.in \
142    pcre_internal.h    pcre_internal.h
143    pcre_compile.c \    pcre_compile.c \
144    pcre_config.c \    pcre_config.c \
# Line 153  files="Makefile.in configure.ac config.h Line 174  files="Makefile.in configure.ac config.h
174    ucpinternal.h \    ucpinternal.h \
175    ucptable.h \    ucptable.h \
176    makevp.bat \    makevp.bat \
   RunTest.bat \  
177    pcre.def \    pcre.def \
178    libpcre.def \    libpcre.def \
179    libpcreposix.def"    libpcreposix.def"
180    
 docfiles="doc/Tech.Notes doc/p*"  
   
181  echo Detrailing  echo Detrailing
182  ./maintain/Detrail $files doc/p* doc/html/*  ./Detrail $files doc/p* doc/html/*
183    
184  echo Building release  echo Converting pcre.h and config.h to generic forms
185  echo " "  cp -f pcre.h pcre.h.generic
186    
187  mkdir Releases/$dir  perl <<'END'
188  mkdir Releases/$dir/doc    open(IN, "<config.h") || die "Can't open config.h: $!\n";
189  mkdir Releases/$dir/testdata    open(OUT, ">config.h.generic") || die "Can't open config.h.generic: $!\n";
190      while (<IN>)
191  cp $files RunTest.in RunGrepTest.in configure install-sh mkinstalldirs \      {
192     config.guess config.sub libpcre.a.dev ltmain.sh Releases/$dir      if (/^#define\s(?!PACKAGE)(\w+)/)
193  cp -r doc/* Releases/$dir/doc        {
194          print OUT "#ifndef $1\n";
195  cp testdata/testinput1 testdata/testoutput1 \        print OUT;
196     testdata/testinput2 testdata/testoutput2 \        print OUT "#endif\n";
197     testdata/testinput3 testdata/testoutput3 \        }
198     testdata/testinput4 testdata/testoutput4 \      else
199     testdata/testinput5 testdata/testoutput5 \        {
200     testdata/testinput6 testdata/testoutput6 \        print OUT;
201     testdata/testinput7 testdata/testoutput7 \        }
202     testdata/testinput8 testdata/testoutput8 \      }
203     testdata/testinput9 testdata/testoutput9 \    close IN;
204     testdata/grepinput  testdata/grepinputx  \    close OUT;
205     testdata/greplist   testdata/grepoutput \  END
    testdata/grepinput8 testdata/grepoutput8 \  
    Releases/$dir/testdata  
   
 # Change the comparison command for testing to the standard one  
   
 ne Releases/$dir/RunTest.in -with /dev/null -opt "ge/cf=cf//cf=diff/"  
 ne Releases/$dir/RunGrepTest.in -with /dev/null -opt "ge/cf=cf//cf=diff/"  
   
 cd Releases  
   
 tar cf $dir.tar $dir  
 gzip -v --best $dir.tar  
 gpg -sb $dir.tar.gz  
   
 tar cf $dir.tar $dir  
 bzip2 -v -9 $dir.tar  
 gpg -sb $dir.tar.bz2  
206    
207  #End  #End

Legend:
Removed from v.99  
changed lines
  Added in v.111

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12