This repository has been archived by the owner on Jun 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
/
Makefile.gnu
65 lines (55 loc) · 1.68 KB
/
Makefile.gnu
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#
# Copyright (C) 2020 IBM. All Rights Reserved.
#
# See LICENSE.txt file in the root directory
# of this source tree for licensing information.
#
# Makefile for GNU-style make
#
# Author: Daniel Nicolas Gisolfi
about:
@echo "Processing a GNU-style Makefile"
init-test:
@python3 -m pip install -r requirements_test.txt
clean: about
-rm -f *.pyc *.pyo *.pyd *\$$py.class
# These two files will be updated by CLAI, we dont want to commit the testing data
-git checkout anonymize.json
-git checkout configPlugins.json
test: about
ifeq (, $(shell type docker-compose 2> /dev/null))
$(warning docker-compose not in $(PATH), running tests locally)
$(MAKE) init-test
@python3 -m pytest $(PWD)/test
else
@echo "running tests in a docker container"
@docker-compose run clai bash -c "cd /clai && make init-test && python3 -m pytest ./test"
endif
dev: about
ifeq (, $(shell type docker-compose 2> /dev/null))
$(warning docker-compose not in $(PATH), running development script locally)
@python3 develop.py install --path $(PWD)
else
@echo "running development script in a docker container"
@docker-compose run clai bash -c "cd /clai && python3 develop.py install --path /clai && bash"
endif
install: about
ifeq ($(shell whoami), root)
@echo "Installing CLAI as root"
./install.sh
else
@echo "You are not running as the superuser, will preform an install local to your user"
./install.sh --user
endif
uninstall: about
ifeq ($(shell whoami), root)
@echo "Uninstalling CLAI as root"
./uninstall.sh
else
@echo "You are not running as the superuser, will preform an uninstall local to your user"
./uninstall.sh --user
endif
MAKE:
intro
install
.PHONY: intro init-test clean test dev install uninstall