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