-
Notifications
You must be signed in to change notification settings - Fork 42
/
Makefile
27 lines (19 loc) · 936 Bytes
/
Makefile
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
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
CPPSOURCES := $(shell find $(CURDIR) -regextype posix-extended -regex '.*\.(c|cpp|h|hpp|cc|cxx|cu) -not -path '$(CURDIR)/third_party/*'')
MDSOURCES := $(shell find $(CURDIR) -regextype posix-extended -regex '.*\.md' -not -path '$(CURDIR)/.github/*' -not -path '$(CURDIR)/third_party/*' -prune)
.PHONY: format lint postinstall
cppformat:
if [ "$(CPPSOURCES)" != "" ]; then clang-format --verbose -i $(CPPSOURCES); fi
cpplint:
if [ "$(CPPSOURCES)" != "" ]; then clang-format --verbose --dry-run --Werror $(CPPSOURCES); fi
mdlint:
if [ "$(MDSOURCES)" != "" ]; then mdl $(MDSOURCES) -g -c .mdlrc; fi
format: cppformat
python3 setup.py format
lint: cpplint mdlint
python3 setup.py lint
postinstall:
cd msamp/operators/dist_op && bash build.sh && cd -
cd msamp/operators/arithmetic && pip install -v . && cd -
cd msamp/optim && pip install -v . && cd -