diff --git a/Kernel/makeall.sh b/Kernel/makeall.sh index dc415f334f..e1beaea98e 100755 --- a/Kernel/makeall.sh +++ b/Kernel/makeall.sh @@ -1,9 +1,4 @@ #!/bin/sh -if [ -z "$SERENITY_ROOT" ]; then - echo "You must source Toolchain/UseIt.sh to build Serenity." - exit 1 -fi - set -e # Get user and group details for setting qemu disk image ownership diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 9819564495..48828e888e 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -1,13 +1,13 @@ #!/bin/bash -if [ -z "$SERENITY_ROOT" ]; then - echo "You must source UseIt.sh to build ports." - exit 1 -fi set -eu -prefix=$(pwd)/.. + +SCRIPT=`dirname $0` +export SERENITY_ROOT=`realpath $SCRIPT/../` +prefix=$SERENITY_ROOT/Ports export CC=i686-pc-serenity-gcc export CXX=i686-pc-serenity-g++ +export PATH=$SERENITY_ROOT/Toolchain/Local/bin:$PATH . "$@" shift diff --git a/ReadMe.md b/ReadMe.md index 0a6e8c61df..df4601002b 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -77,9 +77,9 @@ sudo apt-get install gcc-8 g++-8 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 ``` -Go into the `Toolchain/` directory and run the **BuildIt.sh** script. Then ***source*** the **UseIt.sh** script to put the `i686-pc-serenity` toolchain in your `$PATH`. +Go into the `Toolchain/` directory and run the **BuildIt.sh** script. -Once you've done both of those, go into the `Kernel/` directory, then run +Once you've built the toolchain, go into the `Kernel/` directory, then run **./makeall.sh**, and if nothing breaks too much, take it for a spin by using **./run**. diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index 8855462736..58bff6a752 100755 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -16,7 +16,6 @@ echo PREFIX is "$PREFIX" echo SYSROOT is "$SYSROOT" mkdir -p "$DIR/Tarballs" -source "$DIR/UseIt.sh" BINUTILS_VERSION="2.33.1" BINUTILS_MD5SUM="1a6b16bcc926e312633fcc3fae14ba0a" diff --git a/Toolchain/UseIt.sh b/Toolchain/UseIt.sh deleted file mode 100644 index 94b56f9e4f..0000000000 --- a/Toolchain/UseIt.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# This file will need to be run in bash, for now. - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -export PATH="$DIR/Local/bin:$PATH" -export TOOLCHAIN="$DIR" -export SERENITY_ROOT="$DIR/.." -echo "$PATH"