Automatically source toolchain when building
This commit is contained in:
parent
f6bbb8b2cb
commit
0c41873da8
4
Makefile
4
Makefile
@ -1,5 +1,9 @@
|
||||
APPS=init hello sh ls terminal uname compositor drawlines background session kdebug cat yutani-test sysinfo hostname yutani-query env mount date echo nyancat kill ps pstree bim terminal-vga cursor-off font-server migrate free uptime
|
||||
|
||||
ifeq ($(TOOLCHAIN),)
|
||||
export PATH := $(shell util/activate.sh)
|
||||
endif
|
||||
|
||||
KERNEL_TARGET=i686-pc-toaru
|
||||
KCC = $(KERNEL_TARGET)-gcc
|
||||
KAS = $(KERNEL_TARGET)-as
|
||||
|
8
util/activate.sh
Normal file → Executable file
8
util/activate.sh
Normal file → Executable file
@ -1,4 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [ ! -e "$DIR/local/bin/i686-pc-toaru-gcc" ]; then
|
||||
echo "Toolchain has not been built. Please run \`bash util/build-gcc.sh\`." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export PATH="$DIR/local/bin:$PATH"
|
||||
export TOOLCHAIN="$DIR"
|
||||
echo "$DIR/local/bin:$PATH"
|
||||
|
Loading…
Reference in New Issue
Block a user