Changeset 259
- Timestamp:
- 06/26/08 09:01:31 (2 months ago)
- Files:
-
- home/bin/build (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
home/bin/build
r256 r259 7 7 THIS="build" 8 8 9 MIGOR_ROOT=/export/MigoR-BSP- 20080326/rootfs9 MIGOR_ROOT=/export/MigoR-BSP-current/rootfs 10 10 11 11 # Default configure flags … … 112 112 113 113 case $arch in 114 sh3* | sh4*) 115 build_set_paths "$HOME/usr/share/gnush4-nofpu_linux_v0701-1" 116 BUILD_TARGET_ARCH="sh3-linux" 117 CONFIGURE_FLAGS="--host=sh3-linux --prefix=$MIGOR_ROOT" 118 PKG_CONFIG_PATH="$MIGOR_ROOT/usr/local/lib/pkgconfig:$MIGOR_ROOT/usr/lib/pkgconfig" 114 sh | sh3* | sh4*) 115 BUILD_KERNEL_ARCH=sh 116 117 # Build on gentoo crossdev 118 #build_set_paths "/usr/sh3-unknown-linux-gnu/usr" 119 #export LDFLAGS="-L/usr/sh3-unknown-linux-gnu/lib $LDFLAGS" 120 #BUILD_TARGET_ARCH="sh3-unknown-linux-gnu" 121 #CONFIGURE_FLAGS="--host=sh3-unknown-linux-gnu --prefix=$MIGOR_ROOT" 122 #CONFIGURE_FLAGS="--host=sh3-unknown-linux-gnu --prefix=$HOME/usr-sh3" 123 124 # Build on deka 125 CROSS_DIR="$HOME/cross/toolchain-sh3" 126 build_set_paths $CROSS_DIR 127 128 #BUILD_TARGET_ARCH="sh3-linux" 129 BUILD_TARGET_ARCH="sh3-unknown-linux" 130 #CONFIGURE_FLAGS="--host=sh3-linux --prefix=$MIGOR_ROOT/usr/local" 131 CONFIGURE_FLAGS="--host=sh3-linux --prefix=$HOME/usr-sh3/" 132 133 ## Kernel Kbuild 134 export CROSS_COMPILE="$CROSS_DIR/bin/sh3-linux-" 135 136 ## pkg-config 137 #export PKG_CONFIG_PATH="$MIGOR_ROOT/usr/local/lib/pkgconfig:$MIGOR_ROOT/usr/lib/pkgconfig" 138 #export PKG_CONFIG_PATH="$HOME/usr-MigoR-cross/lib/pkgconfig:$PKG_CONFIG_PATH" 139 export PKG_CONFIG_PATH="$HOME/usr-sh3/lib/pkgconfig:$PKG_CONFIG_PATH" 119 140 ;; 120 141 *86* | amd64* | *) … … 160 181 ############################################################ 161 182 183 build_setup_intree () { 184 if [ -e mplayer.c -o -e ffmpeg.c ] ; then 185 BUILD_IN_TREE="y" 186 fi 187 } 188 162 189 build_kernel () { 163 msg="$1 Linux for $BUILD_ TARGET_ARCH"190 msg="$1 Linux for $BUILD_KERNEL_ARCH" 164 191 shift 165 192 builddir=$(build_get_dir) … … 168 195 169 196 # $MAKE handles DRY_RUN via make -n 170 $MAKE ARCH=$BUILD_TARGET_ARCH O=$builddir $* 197 $MAKE ARCH=$BUILD_KERNEL_ARCH O=$builddir $* 198 199 case $1 in 200 *config) 201 build_try_run "Copying kernel configuration to build dir" \ 202 cp .config $builddir 203 ;; 204 esac 171 205 } 172 206 173 207 build_configure_customize () { 174 208 srcdir=$(pwd) 175 if [ ! -e mplayer.c ]; then209 if test "x$BUILD_IN_TREE" = "x" ; then 176 210 CONFIGURE_FLAGS="--srcdir=$srcdir $CONFIGURE_FLAGS" 177 211 fi … … 189 223 } 190 224 191 build_intree_only () {192 # MPlayer can't be built out-of-tree193 [ "x$BUILD_IN_TREE" = "xy" -o -e mplayer.c ]194 }195 196 225 build_in_builddir () { 197 226 echo "build: [$BUILD_TARGET_ARCH] \"$*\"" 198 227 199 if build_intree_only; then228 if test "x$BUILD_IN_TREE" = "xy" ; then 200 229 build_try_run "Running \"$*\" (in-tree)" \ 201 230 "$*" … … 250 279 builddir=$(build_get_dir) 251 280 if [ -e Kbuild ] ; then 252 build_kernel "Building" 281 build_kernel "Building" $* 253 282 elif [ -e Setup.lhs -o -e Setup.hs ] ; then 254 283 build_cabal_customize … … 299 328 300 329 build_clean () { 301 if [ -e Kbuild -o build_intree_only] ; then330 if [ -e Kbuild -o "x$BUILD_IN_TREE" = "xy" ] ; then 302 331 build_make clean 303 332 elif [ -e Setup.lhs -o -e Setup.hs ] ; then … … 338 367 BUILD_IN_TREE="" 339 368 BUILD_IN_TMPDIR="" 369 370 build_setup_intree 340 371 341 372 GETOPTEST=`getopt --version` … … 414 445 build_prepare $* 415 446 ;; 416 config*)447 *config*) 417 448 build_configure $* 418 449 ;; … … 426 457 build_uninstall $* 427 458 ;; 459 distcheck) 460 build_make distcheck $* 461 ;; 428 462 make*|*) 429 463 build_make $*
