/bin/twn: devcompl command to generate clangd completions in root
This commit is contained in:
1 parent
62866d33ae
commit
d5aec5e6e1
31 files changed
+19
-8
No files matched your search
@@ -1,3 +1,3 @@
|
|||||||
[[deps]]
|
[[deps]]
|
||||||
source = "../../../common-data"
|
source = "../../../data"
|
||||||
name = "common-data"
|
name = "common-data"
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
[[deps]]
|
[[deps]]
|
||||||
source = "../../../common-data" # where does it come from, might be an url
|
source = "../../../data" # where does it come from, might be an url
|
||||||
name = "common-data" # should be globally unique
|
name = "common-data" # should be globally unique
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
[[deps]]
|
[[deps]]
|
||||||
source = "../../../common-data" # where does it come from, might be an url
|
source = "../../../data" # where does it come from, might be an url
|
||||||
name = "common-data" # should be globally unique
|
name = "common-data" # should be globally unique
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
[[deps]]
|
[[deps]]
|
||||||
source = "../../common-data" # where does it come from, might be an url
|
source = "../../data" # where does it come from, might be an url
|
||||||
name = "common-data" # should be globally unique
|
name = "common-data" # should be globally unique
|
||||||
@@ -57,6 +57,9 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
devcompl ) (cd "$TWNROOT" && "$toolpath"/twnbuild "--build_dir=$TWNROOT/build" "${@:2}")
|
||||||
|
;;
|
||||||
|
|
||||||
* ) echo "Unknown command."
|
* ) echo "Unknown command."
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
+4
-2
@@ -5,6 +5,7 @@ from os import getcwd
|
|||||||
from os.path import expandvars
|
from os.path import expandvars
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from sys import argv
|
from sys import argv
|
||||||
|
from functools import reduce
|
||||||
import tomllib
|
import tomllib
|
||||||
|
|
||||||
#TODO: support for default pack override
|
#TODO: support for default pack override
|
||||||
@@ -16,8 +17,9 @@ has_clang = getoutput("command -v clang") != ""
|
|||||||
target_web = "--target=web" in argv
|
target_web = "--target=web" in argv
|
||||||
|
|
||||||
#TODO: infer what "native" means for current env
|
#TODO: infer what "native" means for current env
|
||||||
build_dir = "build/web" if target_web else "build/native"
|
build_dir_arg = reduce(lambda c, n: c if c.startswith("--build_dir=") else n, argv + [""], "")
|
||||||
build_dir += "/release" if "--release" in argv else "/debug"
|
build_dir = "build/web" if target_web else build_dir_arg.split("=")[1] if build_dir_arg else "build/native"
|
||||||
|
build_dir += "" if build_dir_arg else "/release" if "--release" in argv else "/debug"
|
||||||
|
|
||||||
cmake = ["emcmake", "cmake"] if target_web else ["cmake"]
|
cmake = ["emcmake", "cmake"] if target_web else ["cmake"]
|
||||||
# cmake configuration command
|
# cmake configuration command
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
BIN
Binary file not shown.
BIN
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user