meta: If a filed called '.arch' exists, use it as ARCH by default
This commit is contained in:
parent
592fd1ca26
commit
31a83e919b
1
.gitignore
vendored
1
.gitignore
vendored
@ -32,3 +32,4 @@
|
||||
/image.iso
|
||||
/boot/mbr.sys
|
||||
/bootstub
|
||||
/.arch
|
||||
|
2
Makefile
2
Makefile
@ -3,7 +3,7 @@ TOOLCHAIN=util
|
||||
BASE=base
|
||||
export PATH := $(shell $(TOOLCHAIN)/activate.sh)
|
||||
|
||||
ARCH ?= x86_64
|
||||
ARCH ?= $(shell $(TOOLCHAIN)/arch.sh)
|
||||
|
||||
include build/${ARCH}.mk
|
||||
|
||||
|
9
util/arch.sh
Executable file
9
util/arch.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
if [ -e "$DIR/../.arch" ]; then
|
||||
cat "$DIR/../.arch"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "x86_64"
|
Loading…
Reference in New Issue
Block a user