]> git.saurik.com Git - wxWidgets.git/blob - build/script/rebuild-makefiles.sh
even more interface fixes
[wxWidgets.git] / build / script / rebuild-makefiles.sh
1 #!/bin/sh
2
3 CURDATE=`date -I`
4 WORKDIR=/home/bake/bkl-cronjob
5 WINSRCDIR=/mnt/daily
6 FTPDIR=/home/ftp/pub
7 LD_LIBRARY_PATH=/usr/local/lib
8
9 update_from_svn()
10 {
11 (
12 cd ${WORKDIR}/wxWidgets
13 svn up
14 find . -name \.#\* | xargs rm -rf
15 )
16
17 }
18
19
20 regenerate_makefiles()
21 {
22 (cd ${WORKDIR}/wxWidgets/build/bakefiles && nice python -O /usr/local/bin/bakefile_gen)
23 }
24
25
26 do_package()
27 {
28 archtype=$1
29 format=$2
30 shift ; shift
31
32 rm -f ${WORKDIR}/archives/wx-mk-${format}-*
33
34 cd ${WORKDIR}/wxWidgets
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
44 ### zip -l -q -9 ../archives/wx-mk-${format}-${CURDATE}.zip $files
45 zip -q -9 ../archives/wx-mk-${format}-${CURDATE}.zip $files
46 fi
47
48 cd ..
49 }
50
51
52
53
54 package_makefiles()
55 {
56 do_package tar autoconf Makefile.in autoconf_inc.m4
57 do_package zip gnu makefile.unx
58 do_package tar gnu makefile.unx
59 do_package zip mingw makefile.gcc config.gcc
60 do_package zip dmars makefile.dmc config.dmc makefile.dms config.dms
61 do_package zip watcom_msw makefile.wat config.wat
62 do_package zip msvc makefile.vc config.vc
63 do_package zip msvc6prj '*.dsp' '*.dsw'
64 do_package zip msvc7-8prj '*.vcproj' '*.sln'
65 do_package zip evcprj '*.vcp' '*.vcw'
66 (cd ${WORKDIR}/wxWidgets/build/bakefiles && nice python -O /usr/local/bin/bakefile_gen -f watcom -d ../os2/Bakefiles.os2.bkgen)
67 do_package zip watcom_os2 makefile.wat config.wat
68 }
69
70 copy_files ()
71 {
72 ##delete old files and then copy new ones, add a symlink
73
74 ## Makefiles
75 find ${FTPDIR}/Daily_Makefiles/files -type f -name wx-mk\* -mtime +3 | xargs rm -rf
76 cp ${WORKDIR}/archives/wx-mk-* ${FTPDIR}/Daily_Makefiles/files
77
78 rm -f ${FTPDIR}/Daily_Makefiles/wx* ${FTPDIR}/Daily_Makefiles/MD5SUM
79 ##there must be an easier way of doing these links...
80 for f in `find ${FTPDIR}/Daily_Makefiles/files -type f -name wx-mk\* -mmin -601` ; do
81 ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
82 done
83 md5sum ${FTPDIR}/Daily_Makefiles/wx* > ${FTPDIR}/Daily_Makefiles/MD5SUM
84 sleep 10
85 echo CVS Makefiles generated from bakefiles last updated at `date -u` > ${FTPDIR}/Daily_Makefiles/updated_at.txt
86
87 ## Setup.exe
88 find ${FTPDIR}/Daily_HEAD/files -type f -name wx\* -mtime +3 | xargs rm -rf
89 cp ${WORKDIR}/archives/win/*.exe ${FTPDIR}/Daily_HEAD/files
90
91 rm -f ${FTPDIR}/Daily_HEAD/*.exe ${FTPDIR}/Daily_HEAD/MD5SUM
92 ##there must be an easier way of doing these links...
93 for f in `find ${FTPDIR}/Daily_HEAD/files -type f -name wx\*.exe -mmin -601` ; do
94 ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
95 done
96 md5sum ${FTPDIR}/Daily_HEAD/wx* > ${FTPDIR}/Daily_HEAD/MD5SUM
97 sleep 10
98 echo CVS HEAD last updated at `date -u` > ${FTPDIR}/Daily_HEAD/updated_at.txt
99
100
101
102 }
103
104
105 add_win_files ()
106 {
107 ### starts with wx***.zip
108
109 for f in `find ${WINSRCDIR}/ -maxdepth 1 -name wx\*.zip ` ; do
110 cp $f ${WORKDIR}/archives/win/`basename $f | sed -e "s/.zip//"`-${CURDATE}.zip
111 done
112
113 for f in `find ${WINSRCDIR}/ -maxdepth 1 -name wx\*.exe ` ; do
114 cp $f ${WORKDIR}/archives/win/`basename $f | sed -e "s/.exe//"`-${CURDATE}.exe
115 done
116
117 }
118
119 update_from_svn
120 regenerate_makefiles
121 package_makefiles
122
123
124 add_win_files
125
126 copy_files
127
128 exit 0