/bin/twn: devcompl command to generate clangd completions in root

This commit is contained in:
veclavtalica
2025-02-22 20:29:28 +03:00
parent 62866d33ae
commit d5aec5e6e1
31 changed files with 19 additions and 8 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
[[deps]] [[deps]]
source = "../../../common-data" source = "../../../data"
name = "common-data" name = "common-data"
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+3
View File
@@ -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
View File
@@ -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
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.