Просмотр исходного кода

Build: get rid of UseIt.sh

The build system uses relative paths to the toolchain binaries, so
modifying $PATH is no longer necessary, and nothing needs
$SERENITY_ROOT anymore.
joshua stein 5 лет назад
Родитель
Сommit
73c953b674
5 измененных файлов с 7 добавлено и 22 удалено
  1. 0 5
      Kernel/makeall.sh
  2. 5 5
      Ports/.port_include.sh
  3. 2 2
      ReadMe.md
  4. 0 1
      Toolchain/BuildIt.sh
  5. 0 9
      Toolchain/UseIt.sh

+ 0 - 5
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

+ 5 - 5
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

+ 2 - 2
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**.
 

+ 0 - 1
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"

+ 0 - 9
Toolchain/UseIt.sh

@@ -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"