]> git.saurik.com Git - wxWidgets.git/blame - build/script/rebuild-makefiles.sh
add overloads of wxString and wxCStrData::operator[] taking long, for consistency...
[wxWidgets.git] / build / script / rebuild-makefiles.sh
CommitLineData
9f41fa22
CE
1#!/bin/sh
2
3CURDATE=`date -I`
fa24326f 4WORKDIR=/home/bake/bkl-cronjob
7e94d447 5WINSRCDIR=/mnt/daily
fa24326f 6FTPDIR=/home/ftp/pub
14fc1a0c 7LD_LIBRARY_PATH=/usr/local/lib
9f41fa22
CE
8
9update_from_cvs()
10{
11 (
06573427
CE
12 cd ${WORKDIR}/wxWidgets
13 cvs -z3 update -P -d
14 find . -name \.#\* | xargs rm -rf
9f41fa22 15 )
7e94d447 16
9f41fa22
CE
17}
18
19
20regenerate_makefiles()
21{
88ed33cc 22 (cd ${WORKDIR}/wxWidgets/build/bakefiles && nice python -O /usr/local/bin/bakefile_gen)
9f41fa22
CE
23}
24
25
26do_package()
27{
28 archtype=$1
29 format=$2
30 shift ; shift
31
fa24326f 32 rm -f ${WORKDIR}/archives/wx-mk-${format}-*
9f41fa22 33
fa24326f 34 cd ${WORKDIR}/wxWidgets
9f41fa22
CE
35
36 files=""
37 for i in $* ; do
38 files="$files `find -name "$i"`"
39 done
40
41 if test $archtype = tar ; then
42 tar czf ../archives/wx-mk-${format}-${CURDATE}.tar.gz $files
43 elif test $archtype = zip ; then
034e3041 44 zip -l -q -9 ../archives/wx-mk-${format}-${CURDATE}.zip $files
9f41fa22
CE
45 fi
46
47 cd ..
48}
49
7e94d447 50
9f41fa22
CE
51
52
53package_makefiles()
54{
55 do_package tar autoconf Makefile.in autoconf_inc.m4
7e94d447
CE
56 do_package zip gnu makefile.unx
57 do_package tar gnu makefile.unx
9f41fa22 58 do_package zip mingw makefile.gcc config.gcc
14fc1a0c 59 do_package zip dmars makefile.dmc config.dmc makefile.dms config.dms
88ed33cc 60 do_package zip watcom_msw makefile.wat config.wat
9f41fa22
CE
61 do_package zip msvc makefile.vc config.vc
62 do_package zip msvc6prj '*.dsp' '*.dsw'
63 do_package zip evcprj '*.vcp' '*.vcw'
88ed33cc
CE
64 (cd ${WORKDIR}/wxWidgets/build/bakefiles && nice python -O /usr/local/bin/bakefile_gen -f watcom -d ../os2/Bakefiles.os2.bkgen)
65 do_package zip watcom_os2 makefile.wat config.wat
9f41fa22
CE
66}
67
68copy_files ()
69{
70##delete old files and then copy new ones, add a symlink
9f41fa22
CE
71
72## Makefiles
fa24326f
CE
73find ${FTPDIR}/CVS_Makefiles/files -type f -name wx-mk\* -mtime +3 | xargs rm -rf
74cp ${WORKDIR}/archives/wx-mk-* ${FTPDIR}/CVS_Makefiles/files
9f41fa22 75
7e94d447 76rm -f ${FTPDIR}/CVS_Makefiles/wx* ${FTPDIR}/CVS_Makefiles/MD5SUM
a7c476dc 77##there must be an easier way of doing these links...
fa24326f 78for f in `find ${FTPDIR}/CVS_Makefiles/files -type f -name wx-mk\* -mmin -601` ; do
9f41fa22 79 ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
9f41fa22 80done
a7c476dc 81md5sum ${FTPDIR}/CVS_Makefiles/wx* > ${FTPDIR}/CVS_Makefiles/MD5SUM
fa24326f
CE
82sleep 10
83echo CVS Makefiles generated from bakefiles last updated at `date -u` > ${FTPDIR}/CVS_Makefiles/updated_at.txt
14fc1a0c 84
7e94d447
CE
85## Setup.exe
86find ${FTPDIR}/CVS_HEAD/v1/files -type f -name wx\* -mtime +3 | xargs rm -rf
87cp ${WORKDIR}/archives/win/*.exe ${FTPDIR}/CVS_HEAD/v1/files
88
8f9a324c 89rm -f ${FTPDIR}/CVS_HEAD/v1/*.exe ${FTPDIR}/CVS_HEAD/v1/MD5SUM
7e94d447
CE
90##there must be an easier way of doing these links...
91for f in `find ${FTPDIR}/CVS_HEAD/v1/files -type f -name wx\*.exe -mmin -601` ; do
92 ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
93done
8f9a324c 94md5sum ${FTPDIR}/CVS_HEAD/v1/wx* > ${FTPDIR}/CVS_HEAD/v1/MD5SUM
7e94d447
CE
95sleep 10
96echo CVS HEAD last updated at `date -u` > ${FTPDIR}/CVS_HEAD/v1/updated_at.txt
97
14fc1a0c
CE
98
99## Docs...
7e94d447
CE
100find ${FTPDIR}/CVS_Docs/files -type f -name wx\* -mtime +3 | xargs rm -rf
101cp ${WORKDIR}/archives/wx-doc* ${FTPDIR}/CVS_Docs/files
102cp ${WORKDIR}/archives/win/wxW* ${FTPDIR}/CVS_Docs/files
14fc1a0c 103
7e94d447 104rm -f ${FTPDIR}/CVS_Docs/wx* ${FTPDIR}/CVS_Docs/MD5SUM
a7c476dc 105##there must be an easier way of doing these links...
7e94d447 106for f in `find ${FTPDIR}/CVS_Docs/files -type f -name wx\* -mmin -601` ; do
14fc1a0c
CE
107 ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
108done
a7c476dc 109md5sum ${FTPDIR}/CVS_Docs/wx* > ${FTPDIR}/CVS_Docs/MD5SUM
14fc1a0c
CE
110sleep 10
111echo CVS Documentation generated from bakefiles last updated at `date -u` > ${FTPDIR}/CVS_Docs/updated_at.txt
112}
113
114do_texrtf ()
115{
116
117##parameters : subdir_of_tex index.tex dir_under_wxWidgets
7e94d447
CE
118# need this first time only
119if [ ! -e ${WORKDIR}/archives/html/$1 ] ; then
120 mkdir ${WORKDIR}/archives/html/$1
121fi
122
123rm -f ${WORKDIR}/archives/html/$1/*
14fc1a0c
CE
124/usr/local/bin/tex2rtf ${WORKDIR}/wxWidgets/$3/docs/latex/$1/$2 ${WORKDIR}/archives/html/$1/$1 -twice -html -macros ${WORKDIR}/wxWidgets/docs/latex/wx/tex2rtf_css.ini
125cp ${WORKDIR}/wxWidgets/$3/docs/latex/$1/*.gif ${WORKDIR}/archives/html/$1
126cp ${WORKDIR}/wxWidgets/$3/docs/latex/$1/*.css ${WORKDIR}/archives/html/$1
127cd ${WORKDIR}/archives/html/$1
0d727861
CE
128zip -l -q -9 ${WORKDIR}/archives/htb/$1.htb *.html *.css wx.hhc wx.hhp wx.hhk
129zip -q -9 ${WORKDIR}/archives/htb/$1.htb *.gif
9f41fa22
CE
130}
131
14fc1a0c
CE
132##this one for tex2rtf as its latex docs aren't in latex...
133do_util_texrtf ()
134{
135##parameters : subdir_of_tex index.tex
7e94d447
CE
136# need this first time only
137if [ ! -e ${WORKDIR}/archives/html/$1 ] ; then
138 mkdir ${WORKDIR}/archives/html/$1
139fi
140
141rm -f ${WORKDIR}/archives/html/$1/*
14fc1a0c
CE
142/usr/local/bin/tex2rtf ${WORKDIR}/wxWidgets/utils/$1/docs/$2 ${WORKDIR}/archives/html/$1/$1 -twice -html -macros ${WORKDIR}/wxWidgets/docs/latex/wx/tex2rtf_css.ini
143cp ${WORKDIR}/wxWidgets/utils/$1/docs/*.gif ${WORKDIR}/archives/html/$1
144cp ${WORKDIR}/wxWidgets/utils/$1/docs/*.css ${WORKDIR}/archives/html/$1
145cd ${WORKDIR}/archives/html/$1
0d727861
CE
146zip -l -q -9 ${WORKDIR}/archives/htb/$1.htb *.html *.css wx.hhc wx.hhp wx.hhk
147zip -q -9 ${WORKDIR}/archives/htb/$1.htb *.gif
14fc1a0c 148}
9f41fa22 149
14fc1a0c
CE
150do_docs ()
151{
152##remove files, then regenerate
7e94d447
CE
153rm ${WORKDIR}/archives/wx-do*
154rm ${WORKDIR}/archives/win/wx*
14fc1a0c
CE
155rm ${WORKDIR}/archives/htb/*.*
156
157######### dir index.tex rootdir
158do_texrtf wx manual.tex
159do_texrtf book book.tex
160do_texrtf svg dcsvg.tex contrib
161do_texrtf ogl ogl.tex contrib
162do_texrtf mmedia mmedia.tex contrib
163do_texrtf gizmos manual.tex contrib
164do_texrtf fl fl.tex contrib
165do_util_texrtf tex2rtf tex2rtf.tex
166
167cd ${WORKDIR}/archives/
8f9a324c 168tar zcvf ${WORKDIR}/archives/wx-docs-html-${CURDATE}.tar.gz `find . -name '*.gif' -print -o -name '*.html' -print` html/wx/*.css
14fc1a0c 169
8f9a324c
CE
170tar zcvf ${WORKDIR}/archives/wx-docs-htb-${CURDATE}.tar.gz htb/*
171zip -q -9 ${WORKDIR}/archives/wx-docs-htb-${CURDATE}.zip htb/*
14fc1a0c
CE
172
173##remove .con files
174rm ${WORKDIR}/*.con
175
176}
177
178
179add_win_files ()
180{
7e94d447
CE
181### starts with wx***.zip
182
183for f in `find ${WINSRCDIR}/ -name wx\*.zip ` ; do
184 cp $f ${WORKDIR}/archives/win/`basename $f | sed -e "s/.zip//"`-${CURDATE}.zip
14fc1a0c
CE
185 done
186
7e94d447
CE
187for f in `find ${WINSRCDIR}/ -name wx\*.exe ` ; do
188 cp $f ${WORKDIR}/archives/win/`basename $f | sed -e "s/.exe//"`-${CURDATE}.exe
14fc1a0c
CE
189 done
190
191}
9f41fa22
CE
192
193update_from_cvs
194regenerate_makefiles
195package_makefiles
9f41fa22 196
14fc1a0c
CE
197do_docs
198add_win_files
9f41fa22 199
14fc1a0c 200copy_files
9f41fa22 201
14fc1a0c 202exit 0