]> git.saurik.com Git - wxWidgets.git/blame - build/script/rebuild-makefiles.sh
added the logos for our main ports
[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 8
e6c0bfec 9update_from_svn()
9f41fa22
CE
10{
11 (
06573427 12 cd ${WORKDIR}/wxWidgets
e6c0bfec 13 svn up
06573427 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'
7cdeb14d 63 do_package zip msvc7-8prj '*.vcproj' '*.sln'
9f41fa22 64 do_package zip evcprj '*.vcp' '*.vcw'
88ed33cc
CE
65 (cd ${WORKDIR}/wxWidgets/build/bakefiles && nice python -O /usr/local/bin/bakefile_gen -f watcom -d ../os2/Bakefiles.os2.bkgen)
66 do_package zip watcom_os2 makefile.wat config.wat
9f41fa22
CE
67}
68
69copy_files ()
70{
71##delete old files and then copy new ones, add a symlink
9f41fa22
CE
72
73## Makefiles
e6c0bfec
CE
74find ${FTPDIR}/Daily_Makefiles/files -type f -name wx-mk\* -mtime +3 | xargs rm -rf
75cp ${WORKDIR}/archives/wx-mk-* ${FTPDIR}/Daily_Makefiles/files
9f41fa22 76
e6c0bfec 77rm -f ${FTPDIR}/Daily_Makefiles/wx* ${FTPDIR}/Daily_Makefiles/MD5SUM
a7c476dc 78##there must be an easier way of doing these links...
e6c0bfec 79for f in `find ${FTPDIR}/Daily_Makefiles/files -type f -name wx-mk\* -mmin -601` ; do
9f41fa22 80 ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
9f41fa22 81done
e6c0bfec 82md5sum ${FTPDIR}/Daily_Makefiles/wx* > ${FTPDIR}/Daily_Makefiles/MD5SUM
fa24326f 83sleep 10
e6c0bfec 84echo CVS Makefiles generated from bakefiles last updated at `date -u` > ${FTPDIR}/Daily_Makefiles/updated_at.txt
14fc1a0c 85
7e94d447 86## Setup.exe
e6c0bfec
CE
87find ${FTPDIR}/Daily_HEAD/files -type f -name wx\* -mtime +3 | xargs rm -rf
88cp ${WORKDIR}/archives/win/*.exe ${FTPDIR}/Daily_HEAD/files
7e94d447 89
e6c0bfec 90rm -f ${FTPDIR}/Daily_HEAD/*.exe ${FTPDIR}/Daily_HEAD/MD5SUM
7e94d447 91##there must be an easier way of doing these links...
e6c0bfec 92for f in `find ${FTPDIR}/Daily_HEAD/files -type f -name wx\*.exe -mmin -601` ; do
7e94d447
CE
93 ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
94done
e6c0bfec 95md5sum ${FTPDIR}/Daily_HEAD/wx* > ${FTPDIR}/Daily_HEAD/MD5SUM
7e94d447 96sleep 10
e6c0bfec 97echo CVS HEAD last updated at `date -u` > ${FTPDIR}/Daily_HEAD/updated_at.txt
7e94d447 98
14fc1a0c
CE
99
100## Docs...
e6c0bfec
CE
101find ${FTPDIR}/Daily_Docs/files -type f -name wx\* -mtime +3 | xargs rm -rf
102cp ${WORKDIR}/archives/wx-doc* ${FTPDIR}/Daily_Docs/files
103cp ${WORKDIR}/archives/win/wxW* ${FTPDIR}/Daily_Docs/files
14fc1a0c 104
e6c0bfec 105rm -f ${FTPDIR}/Daily_Docs/wx* ${FTPDIR}/Daily_Docs/MD5SUM
a7c476dc 106##there must be an easier way of doing these links...
e6c0bfec 107for f in `find ${FTPDIR}/Daily_Docs/files -type f -name wx\* -mmin -601` ; do
14fc1a0c
CE
108 ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
109done
e6c0bfec 110md5sum ${FTPDIR}/Daily_Docs/wx* > ${FTPDIR}/Daily_Docs/MD5SUM
14fc1a0c 111sleep 10
e6c0bfec 112echo CVS Documentation generated from bakefiles last updated at `date -u` > ${FTPDIR}/Daily_Docs/updated_at.txt
14fc1a0c
CE
113}
114
115do_texrtf ()
116{
117
118##parameters : subdir_of_tex index.tex dir_under_wxWidgets
7e94d447
CE
119# need this first time only
120if [ ! -e ${WORKDIR}/archives/html/$1 ] ; then
121 mkdir ${WORKDIR}/archives/html/$1
122fi
123
124rm -f ${WORKDIR}/archives/html/$1/*
14fc1a0c
CE
125/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
126cp ${WORKDIR}/wxWidgets/$3/docs/latex/$1/*.gif ${WORKDIR}/archives/html/$1
127cp ${WORKDIR}/wxWidgets/$3/docs/latex/$1/*.css ${WORKDIR}/archives/html/$1
128cd ${WORKDIR}/archives/html/$1
0d727861
CE
129zip -l -q -9 ${WORKDIR}/archives/htb/$1.htb *.html *.css wx.hhc wx.hhp wx.hhk
130zip -q -9 ${WORKDIR}/archives/htb/$1.htb *.gif
9f41fa22
CE
131}
132
14fc1a0c
CE
133##this one for tex2rtf as its latex docs aren't in latex...
134do_util_texrtf ()
135{
136##parameters : subdir_of_tex index.tex
7e94d447
CE
137# need this first time only
138if [ ! -e ${WORKDIR}/archives/html/$1 ] ; then
139 mkdir ${WORKDIR}/archives/html/$1
140fi
141
142rm -f ${WORKDIR}/archives/html/$1/*
14fc1a0c
CE
143/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
144cp ${WORKDIR}/wxWidgets/utils/$1/docs/*.gif ${WORKDIR}/archives/html/$1
145cp ${WORKDIR}/wxWidgets/utils/$1/docs/*.css ${WORKDIR}/archives/html/$1
146cd ${WORKDIR}/archives/html/$1
0d727861
CE
147zip -l -q -9 ${WORKDIR}/archives/htb/$1.htb *.html *.css wx.hhc wx.hhp wx.hhk
148zip -q -9 ${WORKDIR}/archives/htb/$1.htb *.gif
14fc1a0c 149}
9f41fa22 150
14fc1a0c
CE
151do_docs ()
152{
153##remove files, then regenerate
7e94d447
CE
154rm ${WORKDIR}/archives/wx-do*
155rm ${WORKDIR}/archives/win/wx*
14fc1a0c
CE
156rm ${WORKDIR}/archives/htb/*.*
157
158######### dir index.tex rootdir
159do_texrtf wx manual.tex
14980f51
CE
160#do_texrtf book book.tex
161#do_texrtf svg dcsvg.tex contrib
162#do_texrtf ogl ogl.tex contrib
163#do_texrtf mmedia mmedia.tex contrib
164#do_texrtf gizmos manual.tex contrib
165#do_texrtf fl fl.tex contrib
14fc1a0c
CE
166do_util_texrtf tex2rtf tex2rtf.tex
167
168cd ${WORKDIR}/archives/
8f9a324c 169tar zcvf ${WORKDIR}/archives/wx-docs-html-${CURDATE}.tar.gz `find . -name '*.gif' -print -o -name '*.html' -print` html/wx/*.css
14fc1a0c 170
8f9a324c
CE
171tar zcvf ${WORKDIR}/archives/wx-docs-htb-${CURDATE}.tar.gz htb/*
172zip -q -9 ${WORKDIR}/archives/wx-docs-htb-${CURDATE}.zip htb/*
14fc1a0c
CE
173
174##remove .con files
175rm ${WORKDIR}/*.con
176
177}
178
179
180add_win_files ()
181{
7e94d447
CE
182### starts with wx***.zip
183
e6c0bfec 184for f in `find ${WINSRCDIR}/ -maxdepth 1 -name wx\*.zip ` ; do
7e94d447 185 cp $f ${WORKDIR}/archives/win/`basename $f | sed -e "s/.zip//"`-${CURDATE}.zip
14fc1a0c
CE
186 done
187
e6c0bfec 188for f in `find ${WINSRCDIR}/ -maxdepth 1 -name wx\*.exe ` ; do
7e94d447 189 cp $f ${WORKDIR}/archives/win/`basename $f | sed -e "s/.exe//"`-${CURDATE}.exe
14fc1a0c
CE
190 done
191
192}
9f41fa22 193
e6c0bfec 194update_from_svn
9f41fa22
CE
195regenerate_makefiles
196package_makefiles
9f41fa22 197
14fc1a0c
CE
198do_docs
199add_win_files
9f41fa22 200
14fc1a0c 201copy_files
9f41fa22 202
14fc1a0c 203exit 0