diff options
Diffstat (limited to '')
-rwxr-xr-x | build.sh | 60 |
1 files changed, 35 insertions, 25 deletions
@@ -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 | ||
36 | function 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 | |||
36 | if [ ! -z "$1" ]; then | 65 | if [ ! -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 |
48 | fi | 82 | fi |
49 | 83 | ||
50 | for dir in minibu/src minibu/bu minibu/bu/compat; do | 84 | presetup |
51 | cmd MKDIR ${dir} mkdir -p ${dir} | ||
52 | done | ||
53 | cmd FAKE minibu/bu/autoconfig.h touch minibu/bu/autoconfig.h | ||
54 | for file in $(cd bootstrap; ls); do | ||
55 | cmd BOOTSTRAP minibu/bu/${file} cp bootstrap/${file} minibu/bu | ||
56 | done | ||
57 | for 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 | ||
59 | done | ||
60 | for 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 | ||
62 | done | ||
63 | for 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 | ||
65 | done | ||
66 | for 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 | ||
68 | done | ||
69 | for 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 | ||
71 | done | ||
72 | |||
73 | bld src/build.tab.c src/build.y || cmd BISON src/build.tab.c bison -bsrc/build src/build.y | ||
74 | bld src/build.yy.c src/build.l || cmd FLEX src/build.yy.c flex src/build.l | ||
75 | 85 | ||
76 | for F in $BUSRC $BUEXPSRC; do | 86 | for F in $BUSRC $BUEXPSRC; do |
77 | OUTPUT=${F%.*}.o | 87 | OUTPUT=${F%.*}.o |