-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
66 lines (50 loc) · 1.82 KB
/
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
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
.PHONY: config_encrypt config_decrypt export_deps
##########################
# CONFIGURATION FILES
##########################
# Constants
##########################
DECRYPTED_CONFIG_FILES= $(filter-out , $(wildcard config/*.conf))
ENCRYPTED_CONFIG_FILES= $(wildcard config/*.cast5)
# Rules
##########################
# Private task for echoing instructions
_pwd_prompt:
@echo "Contact Rukmal Weerawarana for decryption password."
# to decrypt config vars
config_decrypt: _pwd_prompt
@$(foreach f, $(ENCRYPTED_CONFIG_FILES), echo "\nDecrypting $(basename $(f))..." && openssl cast5-cbc -d -in $(f) -out $(basename $(f))${\n})
# to encrypt config vars
config_encrypt: _pwd_prompt
@$(foreach f, $(DECRYPTED_CONFIG_FILES), echo "\nEncrypting $(f)..." && openssl cast5-cbc -e -in $(f) -out $(f).cast5${\n})
##########################
# PROJECT DEPENDENCIES
##########################
# Rule to generate and save the conda dependencies on for Windows deployment.
# The packages libedit, readline, libffi, libcxx, ncurses and libcxxabi are not
# available for windows and a thus removed from the resulting YAML file.
export_deps_win:
conda env export --no-builds \
| grep -v -e prefix \
-e libedit \
-e readline \
-e libffi \
-e libcxx \
-e ncurses \
-e libcxxabi \
-e libgfortran
> conda/environment-windows.yml
# Rule to generate and save the conda dependencies for *nix deployment.
# The 'grep -v prefix' acts to remove the user's path from the exported file.
export_deps_nix:
conda env export --no-builds \
| grep -v prefix > conda/environment.yml
# Rule to export requirements.txt for pip.
export_deps_pip:
pip freeze > requirements.txt
# Parent rule to export both *nix and Windows environment files.
export_deps: export_deps_nix export_deps_win export_deps_pip
# Other definitions
# =================
define \n
endef