]> git.saurik.com Git - wxWidgets.git/blame_incremental - build/script/rebuild-makefiles.sh
Forward port of r60190 (wxMSW Cairo support) to trunk.
[wxWidgets.git] / build / script / rebuild-makefiles.sh
... / ...
CommitLineData
1#!/bin/sh
2
3CURDATE=`date -I`
4WORKDIR=/home/bake/bkl-cronjob
5WINSRCDIR=/mnt/daily
6FTPDIR=/home/ftp/pub
7LD_LIBRARY_PATH=/usr/local/lib
8
9update_from_svn()
10{
11 (
12 cd ${WORKDIR}/wxWidgets
13 svn up
14 find . -name \.#\* | xargs rm -rf
15 )
16
17}
18
19
20regenerate_makefiles()
21{
22 (cd ${WORKDIR}/wxWidgets/build/bakefiles && nice python -O /usr/local/bin/bakefile_gen)
23}
24
25
26do_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
54package_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
70copy_files ()
71{
72##delete old files and then copy new ones, add a symlink
73
74## Makefiles
75find ${FTPDIR}/Daily_Makefiles/files -type f -name wx-mk\* -mtime +3 | xargs rm -rf
76cp ${WORKDIR}/archives/wx-mk-* ${FTPDIR}/Daily_Makefiles/files
77
78rm -f ${FTPDIR}/Daily_Makefiles/wx* ${FTPDIR}/Daily_Makefiles/MD5SUM
79##there must be an easier way of doing these links...
80for 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||" `
82done
83md5sum ${FTPDIR}/Daily_Makefiles/wx* > ${FTPDIR}/Daily_Makefiles/MD5SUM
84sleep 10
85echo CVS Makefiles generated from bakefiles last updated at `date -u` > ${FTPDIR}/Daily_Makefiles/updated_at.txt
86
87## Setup.exe
88find ${FTPDIR}/Daily_HEAD/files -type f -name wx\* -mtime +3 | xargs rm -rf
89cp ${WORKDIR}/archives/win/*.exe ${FTPDIR}/Daily_HEAD/files
90
91rm -f ${FTPDIR}/Daily_HEAD/*.exe ${FTPDIR}/Daily_HEAD/MD5SUM
92##there must be an easier way of doing these links...
93for 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||" `
95done
96md5sum ${FTPDIR}/Daily_HEAD/wx* > ${FTPDIR}/Daily_HEAD/MD5SUM
97sleep 10
98echo CVS HEAD last updated at `date -u` > ${FTPDIR}/Daily_HEAD/updated_at.txt
99
100
101
102}
103
104
105add_win_files ()
106{
107### starts with wx***.zip
108
109for 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
113for 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
119update_from_svn
120regenerate_makefiles
121package_makefiles
122
123
124add_win_files
125
126copy_files
127
128exit 0