aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbuild.sh60
1 files changed, 35 insertions, 25 deletions
diff --git a/build.sh b/build.sh
index 0120833..3d8bfdb 100755
--- a/build.sh
+++ b/build.sh
@@ -33,12 +33,46 @@ function gpp()
33 bld "$1" "$2" || cmd CXX "$1" g++ -ggdb -fPIC -W -Wall -Iminibu -c -o "$1" "$2" 33 bld "$1" "$2" || cmd CXX "$1" g++ -ggdb -fPIC -W -Wall -Iminibu -c -o "$1" "$2"
34} 34}
35 35
36function presetup()
37{
38 for dir in minibu/src minibu/bu minibu/bu/compat; do
39 cmd MKDIR ${dir} mkdir -p ${dir}
40 done
41 cmd FAKE minibu/bu/autoconfig.h touch minibu/bu/autoconfig.h
42 for file in $(cd bootstrap; ls); do
43 cmd BOOTSTRAP minibu/bu/${file} cp bootstrap/${file} minibu/bu
44 done
45 for F in $BUSRC; do
46 bld minibu/src/$F || cmd WGET minibu/src/$F wget -q http://svn.xagasoft.com/libbu++/trunk/src/stable/$F -O minibu/src/$F
47 done
48 for F in $BUHDR; do
49 bld minibu/bu/$F || cmd WGET minibu/bu/$F wget -q http://svn.xagasoft.com/libbu++/trunk/src/stable/$F -O minibu/bu/$F
50 done
51 for F in $BUEXPSRC; do
52 bld minibu/src/$F || cmd WGET minibu/src/$F wget -q http://svn.xagasoft.com/libbu++/trunk/src/experimental/$F -O minibu/src/$F
53 done
54 for F in $BUEXPHDR; do
55 bld minibu/bu/$F || cmd WGET minibu/bu/$F wget -q http://svn.xagasoft.com/libbu++/trunk/src/experimental/$F -O minibu/bu/$F
56 done
57 for F in $BUCOMPAT; do
58 bld minibu/bu/$F || cmd WGET minibu/bu/$F wget -q http://svn.xagasoft.com/libbu++/trunk/src/$F -O minibu/bu/$F
59 done
60
61 bld src/build.tab.c src/build.y || cmd BISON src/build.tab.c bison -bsrc/build src/build.y
62 bld src/build.yy.c src/build.l || cmd FLEX src/build.yy.c flex src/build.l
63}
64
36if [ ! -z "$1" ]; then 65if [ ! -z "$1" ]; then
37 if [ "$1" == "clean" -o "$1" == "-c" ]; then 66 if [ "$1" == "clean" -o "$1" == "-c" ]; then
38 echo "Cleaning up, deleting all object code and downloaded source code..." 67 echo "Cleaning up, deleting all object code and downloaded source code..."
39 echo 68 echo
40 rm -Rf minibu src/*.o 69 rm -Rf minibu src/*.o
41 exit 70 exit
71 elif [ "$1" == "setup" -o "$1" == "-s" ]; then
72 echo "Only preforming download / setup"
73 echo
74 presetup
75 exit
42 else 76 else
43 echo "The only option supported is \"clean\", otherwise run $0" 77 echo "The only option supported is \"clean\", otherwise run $0"
44 echo "with no parameters to compile build." 78 echo "with no parameters to compile build."
@@ -47,31 +81,7 @@ if [ ! -z "$1" ]; then
47 fi 81 fi
48fi 82fi
49 83
50for dir in minibu/src minibu/bu minibu/bu/compat; do 84presetup
51 cmd MKDIR ${dir} mkdir -p ${dir}
52done
53cmd FAKE minibu/bu/autoconfig.h touch minibu/bu/autoconfig.h
54for file in $(cd bootstrap; ls); do
55 cmd BOOTSTRAP minibu/bu/${file} cp bootstrap/${file} minibu/bu
56done
57for F in $BUSRC; do
58 bld minibu/src/$F || cmd WGET minibu/src/$F wget -q http://svn.xagasoft.com/libbu++/trunk/src/stable/$F -O minibu/src/$F
59done
60for F in $BUHDR; do
61 bld minibu/bu/$F || cmd WGET minibu/bu/$F wget -q http://svn.xagasoft.com/libbu++/trunk/src/stable/$F -O minibu/bu/$F
62done
63for F in $BUEXPSRC; do
64 bld minibu/src/$F || cmd WGET minibu/src/$F wget -q http://svn.xagasoft.com/libbu++/trunk/src/experimental/$F -O minibu/src/$F
65done
66for F in $BUEXPHDR; do
67 bld minibu/bu/$F || cmd WGET minibu/bu/$F wget -q http://svn.xagasoft.com/libbu++/trunk/src/experimental/$F -O minibu/bu/$F
68done
69for F in $BUCOMPAT; do
70 bld minibu/bu/$F || cmd WGET minibu/bu/$F wget -q http://svn.xagasoft.com/libbu++/trunk/src/$F -O minibu/bu/$F
71done
72
73bld src/build.tab.c src/build.y || cmd BISON src/build.tab.c bison -bsrc/build src/build.y
74bld src/build.yy.c src/build.l || cmd FLEX src/build.yy.c flex src/build.l
75 85
76for F in $BUSRC $BUEXPSRC; do 86for F in $BUSRC $BUEXPSRC; do
77 OUTPUT=${F%.*}.o 87 OUTPUT=${F%.*}.o