Changeset View
Changeset View
Standalone View
Standalone View
Makefile.local
- This file was added.
YARN ?= yarn | |||||||||||
PYTHON ?= python3 | |||||||||||
vlorentzUnsubmitted Done Inline Actions
vlorentz: | |||||||||||
ts-install: package.json | |||||||||||
$(YARN) install | |||||||||||
install emscripten required for generating tree-sitter WASM module in swh-search | |||||||||||
cd /opt && git clone https://github.com/emscripten-core/emsdk.git && cd emsdk && \ | |||||||||||
Not Done Inline Actionsts-build must depend on ts-install target anlambert: ts-build must depend on ts-install target | |||||||||||
Not Done Inline Actionsand on the source files too vlorentz: and on the source files too | |||||||||||
./emsdk install latest && ./emsdk activate latest | |||||||||||
Not Done Inline ActionsI got that error the first time I tried to execute that target: 14:50 $ make ts-build cd search_language && python build.py Traceback (most recent call last): File "build.py", line 3, in <module> Language.build_library("../generated/swh_ql.so", ["."]) File "/home/anlambert/.virtualenvs/swh/lib/python3.7/site-packages/tree_sitter/__init__.py", line 42, in build_library path.getmtime(path_) for path_ in source_paths File "/home/anlambert/.virtualenvs/swh/lib/python3.7/site-packages/tree_sitter/__init__.py", line 42, in <listcomp> path.getmtime(path_) for path_ in source_paths File "/home/anlambert/.virtualenvs/swh/lib/python3.7/genericpath.py", line 55, in getmtime return os.stat(filename).st_mtime FileNotFoundError: [Errno 2] No such file or directory: './src/parser.c' make: *** [Makefile.local:9: ts-build] Error 1 This is because parser source files have not been generated yet, I fixed it by using that command chain instead: cd search_language && $(YARN) generate && $(PYTHON) build.py anlambert: I got that error the first time I tried to execute that target:
```
14:50 $ make ts-build
cd… | |||||||||||
PATH="${PATH}:/opt/emsdk/upstream/emscripten" | |||||||||||
Not Done Inline Actionssame here, must depend on ts-install anlambert: same here, must depend on ts-install | |||||||||||
ts-generate: ts-install query_language/grammar.js | |||||||||||
$(YARN) generate | |||||||||||
Not Done Inline Actionssame here, must depend on ts-install anlambert: same here, must depend on ts-install | |||||||||||
ts-dev: ts-install | |||||||||||
ifdef sanitize | |||||||||||
$(YARN) dev | sed '5,$$s/[[0-9]\+, [0-9]\+]/ /g' | sed '5,$$s/ *- *//g'; | |||||||||||
else | |||||||||||
$(YARN) dev; | |||||||||||
endif | |||||||||||
ts-test: ts-install | |||||||||||
$(YARN) test | |||||||||||
ts-build-so: ts-generate query_language/src/ | |||||||||||
$(YARN) build-so | |||||||||||
ts-build-wasm: ts-generate query_language/src/ | |||||||||||
$(YARN) build-wasm | |||||||||||
ts-build: ts-build-so ts-build-wasm | |||||||||||
@echo 'Build completed' | |||||||||||
ts-repl: ts-generate | |||||||||||
$(YARN) repl |