]> git.saurik.com Git - wxWidgets.git/blame - build/script/rebuild-makefiles.sh
adapted Julian's new speed improved version
[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
d36dbec9
CE
44### zip -l -q -9 ../archives/wx-mk-${format}-${CURDATE}.zip $files
45 zip -q -9 ../archives/wx-mk-${format}-${CURDATE}.zip $files
9f41fa22
CE
46 fi
47
48 cd ..
49}
50
7e94d447 51
9f41fa22
CE
52
53
54package_makefiles()
55{
56 do_package tar autoconf Makefile.in autoconf_inc.m4
7e94d447
CE
57 do_package zip gnu makefile.unx
58 do_package tar gnu makefile.unx
9f41fa22 59 do_package zip mingw makefile.gcc config.gcc
14fc1a0c 60 do_package zip dmars makefile.dmc config.dmc makefile.dms config.dms
88ed33cc 61 do_package zip watcom_msw makefile.wat config.wat
9f41fa22
CE
62 do_package zip msvc makefile.vc config.vc
63 do_package zip msvc6prj '*.dsp' '*.dsw'
7cdeb14d 64 do_package zip msvc7-8prj '*.vcproj' '*.sln'
9f41fa22 65 do_package zip evcprj '*.vcp' '*.vcw'
88ed33cc
CE
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
9f41fa22
CE
68}
69
70copy_files ()
71{
72##delete old files and then copy new ones, add a symlink
9f41fa22
CE
73
74## Makefiles
e6c0bfec
CE
75find ${FTPDIR}/Daily_Makefiles/files -type f -name wx-mk\* -mtime +3 | xargs rm -rf
76cp ${WORKDIR}/archives/wx-mk-* ${FTPDIR}/Daily_Makefiles/files
9f41fa22 77
e6c0bfec 78rm -f ${FTPDIR}/Daily_Makefiles/wx* ${FTPDIR}/Daily_Makefiles/MD5SUM
a7c476dc 79##there must be an easier way of doing these links...
e6c0bfec 80for f in `find ${FTPDIR}/Daily_Makefiles/files -type f -name wx-mk\* -mmin -601` ; do
9f41fa22 81 ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
9f41fa22 82done
e6c0bfec 83md5sum ${FTPDIR}/Daily_Makefiles/wx* > ${FTPDIR}/Daily_Makefiles/MD5SUM
fa24326f 84sleep 10
e6c0bfec 85echo CVS Makefiles generated from bakefiles last updated at `date -u` > ${FTPDIR}/Daily_Makefiles/updated_at.txt
14fc1a0c 86
7e94d447 87## Setup.exe
e6c0bfec
CE
88find ${FTPDIR}/Daily_HEAD/files -type f -name wx\* -mtime +3 | xargs rm -rf
89cp ${WORKDIR}/archives/win/*.exe ${FTPDIR}/Daily_HEAD/files
7e94d447 90
e6c0bfec 91rm -f ${FTPDIR}/Daily_HEAD/*.exe ${FTPDIR}/Daily_HEAD/MD5SUM
7e94d447 92##there must be an easier way of doing these links...
e6c0bfec 93for f in `find ${FTPDIR}/Daily_HEAD/files -type f -name wx\*.exe -mmin -601` ; do
7e94d447
CE
94 ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
95done
e6c0bfec 96md5sum ${FTPDIR}/Daily_HEAD/wx* > ${FTPDIR}/Daily_HEAD/MD5SUM
7e94d447 97sleep 10
e6c0bfec 98echo CVS HEAD last updated at `date -u` > ${FTPDIR}/Daily_HEAD/updated_at.txt
7e94d447 99
14fc1a0c 100
14fc1a0c
CE
101
102}
103
104
105add_win_files ()
106{
7e94d447
CE
107### starts with wx***.zip
108
e6c0bfec 109for f in `find ${WINSRCDIR}/ -maxdepth 1 -name wx\*.zip ` ; do
7e94d447 110 cp $f ${WORKDIR}/archives/win/`basename $f | sed -e "s/.zip//"`-${CURDATE}.zip
14fc1a0c
CE
111 done
112
e6c0bfec 113for f in `find ${WINSRCDIR}/ -maxdepth 1 -name wx\*.exe ` ; do
7e94d447 114 cp $f ${WORKDIR}/archives/win/`basename $f | sed -e "s/.exe//"`-${CURDATE}.exe
14fc1a0c
CE
115 done
116
117}
9f41fa22 118
e6c0bfec 119update_from_svn
9f41fa22
CE
120regenerate_makefiles
121package_makefiles
9f41fa22 122
d36dbec9 123
14fc1a0c 124add_win_files
9f41fa22 125
14fc1a0c 126copy_files
9f41fa22 127
14fc1a0c 128exit 0