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