-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
60 lines (49 loc) · 1.63 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
.DEFAULT_GOAL := help
# Setup
PROJECT_NAME := IconCreationPlugin
WORKSPACE ?= ${PWD}
PLATFORM_LIST = Windows MacOS
VIRTUAL_ENV_DIR = _venv
# Maya
MAYA_VERSION = 2020
BUILD_MAYA := ./scripts/build-maya.sh
DEV_MAYA := ./scripts/dev-maya.sh
# Push the variables to the env.
export MAYA_VERSION WORKSPACE PROJECT_NAME
# Remove all files created by the build command.
.PHONY : clean
clean:
rm -Rf build dist src/*.egg-info .eggs *.egg
find . -name "*.pyc" -exec rm -f {} \;
# Build into a useable Maya module in the dist directory at the project root.
.PHONY : build
build: clean build-windows build-mac
build-windows:
export PLATFORM=Windows; \
export MAYA_MODULE_PATH=$$WORKSPACE/dist/$$PLATFORM/maya/modules; \
${BUILD_MAYA} && \
cd $$WORKSPACE/dist/$$PLATFORM/maya/modules && \
zip -r $$WORKSPACE/dist/IconCreationPlugin-$$PLATFORM-0.2.0.zip ./*
build-mac:
export PLATFORM=MacOS; \
export MAYA_MODULE_PATH=$$WORKSPACE/dist/$$PLATFORM/maya/modules; \
${BUILD_MAYA} && \
cd $$WORKSPACE/dist/$$PLATFORM/maya/modules && \
zip -r $$WORKSPACE/dist/IconCreationPlugin-$$PLATFORM-0.2.0.zip ./*
.PHONY : dev
dev: clean build dev-windows dev-mac
dev-windows:
export PLATFORM=Windows; \
export MAYA_MODULE_PATH=$$WORKSPACE/dist/$$PLATFORM/maya/modules; \
${DEV_MAYA}
dev-mac:
export PLATFORM=MacOS; \
export MAYA_MODULE_PATH=$$WORKSPACE/dist/$$PLATFORM/maya/modules; \
${DEV_MAYA}
.PHONY : install-dev-deps
install-dev-deps:
virtualenv -p python2.7 --no-setuptools --clear ${VIRTUAL_ENV_DIR}
source ${VIRTUAL_ENV_DIR}/bin/activate && \
pip install "setuptools<45"
source ${VIRTUAL_ENV_DIR}/bin/activate && \
pip install -r requirements/dev.txt