mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
add debug build message and align more with build.bat
1. if ran without choosing a build type (just `make` or `build_odin.sh`), print out a message about it being a debug build 2. Add `make release-native` alongside `make release_native` to align with `build_odin.sh release-native` 3. Only run the demo if it is a debug build (just like `build.bat`)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
all: debug
|
all: default
|
||||||
|
|
||||||
demo:
|
demo:
|
||||||
./odin run examples/demo/demo.odin -file
|
./odin run examples/demo/demo.odin -file
|
||||||
@@ -6,12 +6,18 @@ demo:
|
|||||||
report:
|
report:
|
||||||
./odin report
|
./odin report
|
||||||
|
|
||||||
|
default:
|
||||||
|
PROGRAM=make ./build_odin.sh # debug
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
./build_odin.sh debug
|
./build_odin.sh debug
|
||||||
|
|
||||||
release:
|
release:
|
||||||
./build_odin.sh release
|
./build_odin.sh release
|
||||||
|
|
||||||
|
release-native:
|
||||||
|
./build_odin.sh release-native
|
||||||
|
|
||||||
release_native:
|
release_native:
|
||||||
./build_odin.sh release-native
|
./build_odin.sh release-native
|
||||||
|
|
||||||
|
|||||||
+6
-1
@@ -144,12 +144,17 @@ build_odin() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
run_demo() {
|
run_demo() {
|
||||||
./odin run examples/demo -vet -strict-style -- Hellope World
|
if [ $# -eq 0 ] || [ "$1" = "debug" ]; then
|
||||||
|
./odin run examples/demo -vet -strict-style -- Hellope World
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
build_odin debug
|
build_odin debug
|
||||||
run_demo
|
run_demo
|
||||||
|
|
||||||
|
: ${PROGRAM:=$0}
|
||||||
|
echo "\nDebug compiler built. Note: run \"$PROGRAM release\" or \"$PROGRAM release-native\" if you want a faster, release mode compiler."
|
||||||
elif [ $# -eq 1 ]; then
|
elif [ $# -eq 1 ]; then
|
||||||
case $1 in
|
case $1 in
|
||||||
report)
|
report)
|
||||||
|
|||||||
Reference in New Issue
Block a user