-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (25 loc) · 1.03 KB
/
Makefile
File metadata and controls
32 lines (25 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright (C) 2022 Toitware ApS.
# Use of this source code is governed by a Zero-Clause BSD license that can
# be found in the tests/LICENSE file.
all: test
.PHONY: build/host/CMakeCache.txt
build/CMakeCache.txt:
$(MAKE) rebuild-cmake
install-pkgs: rebuild-cmake
cmake --build build --target install-pkgs
test: install-pkgs rebuild-cmake
cmake --build build --target check
# We rebuild the cmake file all the time.
# We use "glob" in the cmakefile, and wouldn't otherwise notice if a new
# file (for example a test) was added or removed.
# It takes <1s on Linux to run cmake, so it doesn't hurt to run it frequently.
rebuild-cmake:
mkdir -p build
# We need to set a build type, otherwise cmake won't run nicely on Windows.
# The build-type is otherwise unused.
cmake -B build -DCMAKE_BUILD_TYPE=Debug
update-pkgs:
for d in $$(git ls-files | grep package.yaml | grep -v tests/pkg | grep -v tests/lsp/project-root-multi); do \
toit pkg update --project-root $$(dirname $$d); \
done
.PHONY: all test rebuild-cmake install-pkgs update-pkgs