forked from Gibies/aiesda
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
78 lines (59 loc) · 1.89 KB
/
Copy pathMakefile
File metadata and controls
78 lines (59 loc) · 1.89 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
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
66
67
68
69
70
71
72
73
74
75
76
77
78
# AIESDA Automation Makefile
# Targets: install, clean, test
# Default message if none is provided
MSG ?= "routine_update"
# Archive local changes with a message
# Usage: make archive MSG="your_message_here"
SITE ?= docker
.PHONY: install clean test help sync version bump archive reinstall update release check-paths
# Use a variable for colors to make it maintainable
GREEN := $(shell tput -Txterm setaf 2)
RESET := $(shell tput -Txterm sgr0)
# Default target
help:
@echo "AIESDA Management Commands:"
@echo " ${GREEN} make sync ${RESET} - Pull remote source (handles elogin)"
@echo " ${GREEN} make install ${RESET} - Build and install [SITE=$(SITE)]"
@echo " ${GREEN} make clean ${RESET} - Surgical uninstall of current version"
@echo " ${GREEN} make update ${RESET} - Sync source and reinstall"
@echo " ${GREEN} make release ${RESET} - Bump version and push to repository"
@echo " ${GREEN} make test ${RESET} - Run post-installation verification"
# Use this to verify the version before a build
version:
@echo "Current Target: $$(cat VERSION)"
check-paths:
@if [ $$(pwd) = $$(readlink -f $(BUILD_DIR) | cut -c 1-$${#$$(pwd)}) ]; then \
echo "Build directory cannot be inside the source tree!"; \
exit 1; \
fi
check-modules:
@bash jobs/setup_env_module.sh
sync:
@bash jobs/update_pkg.sh
clean:
@bash jobs/remove.sh $$(cat VERSION)
test:
@$(MAKE) sync
@bash jobs/aiesda-dev-cycle-test.sh --site $(SITE)
bump:
@bash jobs/bump_version.sh
archive:
@bash jobs/archive_pkg.sh -m $(MSG)
jedidocker:
@bash jobs/jedi_docker_build.sh
jedilocal:
@bash jobs/jedi_local_build.sh
install:
@$(MAKE) check-paths
@bash jobs/install.sh --site $(SITE)
# Ensure clean finishes before install starts
reinstall:
@$(MAKE) clean
@$(MAKE) install SITE=$(SITE)
update:
@$(MAKE) sync
@$(MAKE) reinstall SITE=$(SITE)
release:
@$(MAKE) test
@$(MAKE) bump
@$(MAKE) archive MSG=$(MSG)