Minor changes, mostly to documentation. Several bug fixes.
[xuni.git] / makedist.sh
blob71efb7870542d36d218fcc37733e6ec2579dc6ab
1 #!/bin/sh
3 # Determine the version of xuni
4 VERSION="$(./version.sh)"
6 bin_files="editor test src/test/test.so"
7 force_reconf=1
9 function ensure_src {
10 if [ ! -f "xuni-$VERSION-src.tar.gz" ]; then
11 echo make_src >/dev/null
15 function make_src {
16 if [ $force_reconf != "0" ]; then
17 ./autotool.sh && make clean && make
20 make dist
22 #./makedistar.sh xuni-$VERSION src $(./dist_files.sh)
23 mv xuni-$VERSION.tar.gz xuni-$VERSION-src.tar.gz
26 function make_64 {
27 ensure_src
28 cp xuni-$VERSION-src.tar.gz xuni-$VERSION-lin64.tar.gz
29 ./makedistar.sh --update xuni-$VERSION lin64 $bin_files
32 function make_32 {
33 ensure_src
35 if [ $force_reconf != "0" ]; then
36 ./make32.sh
39 make clean && make
41 cp xuni-$VERSION-src.tar.gz xuni-$VERSION-lin32.tar.gz
42 ./makedistar.sh --update xuni-$VERSION lin32 $bin_files
45 function make_win {
46 win_bin_files="editor.exe test.exe" # src/test/test.so
48 ensure_src
50 #make clean && echo SVNVERSION="$(./svnversion.sh)"
51 make clean && ./winmake.sh #SVNVERSION="$(./svnversion.sh)"
53 for dll in dll/*.dll; do
54 cp $dll .
55 done
57 cp xuni-$VERSION-src.tar.gz xuni-$VERSION-win32.tar.gz
58 ./makedistar.sh --update xuni-$VERSION win32 $win_bin_files *.dll
60 rm *.dll
63 function make_doc {
64 doc_files="$(svn list -R | grep doc | grep -v '/$') \
65 $(find doc/html -type f)"
67 ./makedistar.sh --create xuni-$VERSION doc $doc_files
70 for arg in $*; do
71 case $arg in
72 --force-reconf)
73 force_reconf=1
75 --no-force-reconf)
76 force_reconf=0
78 --make-src)
79 make_src
81 --make-64)
82 make_64
84 --make-32)
85 make_32
87 --make-win)
88 make_win
90 --make-doc)
91 make_doc
93 --make-all)
94 make_src
95 make_64
96 make_32
97 make_win
98 make_doc
100 esac
101 done