1 --- RosBE-Builder.sh 2011-05-26 14:02:33.832258692 +0300
2 +++ RosBE-Builder.sh.no_interact 2011-05-26 14:35:48.454646641 +0300
5 echo "Ready to build and install the ReactOS Build Environment."
6 echo "Press Return to continue or Ctrl+C to exit."
10 installdir=`eval echo $1`
13 rs_mkdir_if_not_exists "$rs_prefixdir/$rs_target"
14 rs_mkdir_if_not_exists "$rs_supportprefixdir"
16 -# Use -march=native if the host compiler supports it
17 -echo -n "Checking if the host compiler supports -march=native... "
18 +# Load the -march setting from makepkg.conf
19 +source /etc/makepkg.conf
20 +for i in `echo $CFLAGS`; do
21 + if `echo "$i" | grep -q "\-march="`; then
22 + rs_host_cflags+=" $i"
26 -if `gcc -march=native -o "$rs_workdir/dummy" "$rs_scriptdir/tools/dummy.c" >& /dev/null`; then
28 - rs_host_cflags+=" -march=native"
29 - rm "$rs_workdir/dummy"
34 rs_extract_module "mingw_runtime_dev" "$rs_prefixdir/$rs_target"
35 rs_extract_module "w32api" "$rs_prefixdir/$rs_target"
37 rs_do_command gcc -s -o "$installdir/bin/cpucount" "$rs_scriptdir/tools/cpucount.c"
40 -rs_cpucount=`$installdir/bin/cpucount -x1`
41 +# Load the job thread count from makepkg.conf
42 +# if set, otherwice use cpucount
43 +if [[ "$MAKEFLAGS" == "" ]]; then
44 + rs_cpucount=`$installdir/bin/cpucount -x1`
46 + for i in `echo $MAKEFLAGS`; do
47 + if `echo "$i" | grep -q "\-j"`; then
48 + rs_cpucount=`echo "$i" | sed 's|-j||g'`
53 if $rs_process_getincludes; then
54 rs_do_command gcc -s -o "$installdir/bin/getincludes" "$rs_scriptdir/tools/getincludes.c"
58 rs_boldmsg "Finished successfully!"
59 -echo "To create a shortcut to the Build Environment on the Desktop, please switch back to your"
60 -echo "normal User Account (I assume you ran this script as \"root\")."
61 -echo "Then execute the following command:"
63 -echo " $installdir/createshortcut.sh"
65 -echo "If you just want to start the Build Environment without using a shortcut, execute the"
66 -echo "following command:"
68 -echo " $installdir/RosBE.sh [source directory] [color code] [architecture]"
70 -echo "All parameters for that script are optional."