]> git.saurik.com Git - wxWidgets.git/blob - build/script/rebuild-makefiles.sh
Fixed compilation for GTK 1.2
[wxWidgets.git] / build / script / rebuild-makefiles.sh
1 #!/bin/sh
2
3 CURDATE=`date -I`
4 WORKDIR=/home/bake/bkl-cronjob
5 FTPDIR=/home/ftp/pub
6
7 update_from_cvs()
8 {
9 (
10 cd ${WORKDIR}/wxWidgets && cvs -z3 update -P -d
11 )
12 }
13
14
15 regenerate_makefiles()
16 {
17 (cd ${WORKDIR}/wxWidgets/build/bakefiles && nice python -O ${WORKDIR}/bakefile/bin/bakefile_gen)
18 }
19
20
21 do_package()
22 {
23 archtype=$1
24 format=$2
25 shift ; shift
26
27 rm -f ${WORKDIR}/archives/wx-mk-${format}-*
28
29 cd ${WORKDIR}/wxWidgets
30
31 files=""
32 for i in $* ; do
33 files="$files `find -name "$i"`"
34 done
35
36 if test $archtype = tar ; then
37 tar czf ../archives/wx-mk-${format}-${CURDATE}.tar.gz $files
38 elif test $archtype = zip ; then
39 zip -l -q -9 ../archives/wx-mk-${format}-${CURDATE}.zip $files
40 # (-l translates to DOS line endings)
41 fi
42
43 cd ..
44 }
45
46 package_cvs()
47 {
48 rm -f ${WORKDIR}/archives/wx-cvs-*
49 cd ${WORKDIR}/
50 tar jcf ./archives/wx-cvs-${CURDATE}.tar.bz2 ./wxWidgets
51 }
52
53
54 package_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
59 do_package zip dmars makefile.dmc config.dmc
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
66 copy_files ()
67 {
68 ##delete old files and then copy new ones, add a symlink
69 ## CVS
70 find ${FTPDIR}/CVS_HEAD/files -type f -name wx-cvs\*.tar.bz2 -mtime +6 | xargs rm -rf
71 cp ${WORKDIR}/archives/wx-cvs-* ${FTPDIR}/CVS_HEAD/files
72
73 rm ${FTPDIR}/CVS_HEAD/wx-cvs.tar.bz2
74 ln -s ${FTPDIR}/CVS_HEAD/files/wx-cvs-${CURDATE}.tar.bz2 ${FTPDIR}/CVS_HEAD/wx-cvs.tar.bz2
75 ## make sure updated at is really last
76 sleep 10
77 echo cvs checkout done at `date -u` > ${FTPDIR}/CVS_HEAD/updated_at.txt
78
79 ## Makefiles
80 find ${FTPDIR}/CVS_Makefiles/files -type f -name wx-mk\* -mtime +3 | xargs rm -rf
81 cp ${WORKDIR}/archives/wx-mk-* ${FTPDIR}/CVS_Makefiles/files
82
83 rm ${FTPDIR}/CVS_Makefiles/wx*
84 ##there musrt be an easier way of doing these links...
85 for f in `find ${FTPDIR}/CVS_Makefiles/files -type f -name wx-mk\* -mmin -601` ; do
86 ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
87 # echo $f
88 # echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||"
89 done
90 sleep 10
91 echo CVS Makefiles generated from bakefiles last updated at `date -u` > ${FTPDIR}/CVS_Makefiles/updated_at.txt
92 }
93
94
95
96 update_from_cvs
97 regenerate_makefiles
98 package_makefiles
99 package_cvs
100
101 copy_files
102
103