-
Notifications
You must be signed in to change notification settings - Fork 15
/
daml.mk
29 lines (23 loc) · 854 Bytes
/
daml.mk
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
#
# Copyright (c) 2021, Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
comma := ,
daml ?= daml
dars := $(shell scripts/getDamlProjects.sh)
project-root = $(patsubst %/.daml/dist,%,$(@D))
phony-test-targets := $(patsubst %,%-phony-test-target,$(dars))
.PHONY: build-dars
build-dars: $(dars)
.PHONY: test-dars
test-dars: $(phony-test-targets)
ui/daml.js: $(dars)
$(daml) codegen js $^ -o $@
@touch $@
.PHONY: $(phony-test-targets)
$(phony-test-targets): build-dars
@# TODO remove $(PWD)/ when resolved: https://github.com/digital-asset/daml/issues/9646
DAML_PROJECT=$(project-root) $(daml) test --junit $(PWD)/target/daml-test-reports/$(@F).xml
.SECONDEXPANSION:
$(dars): $$(shell scripts/getDamlDependencies.sh $$(project-root))
$(daml) build --project-root $(project-root)