blob: 77593559c47e22e462c3934576a7dde5f9ea8484 [file] [log] [blame]
Zsolt Haraszti8fa9da02016-09-10 17:34:03 -07001#
2# Copyright 2016 the original author or authors.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17VENVDIR := venv
18
19.PHONY: venv
20
21default: build
22
23help:
24 @echo "Usage: make [<target>]"
25 @echo "where available targets are:"
26 @echo
27 @echo "build : Build the Voltha docker image (default target)"
28 @echo "fetch : Pre-fetch artifacts for subsequent local builds"
29 @echo "help : Print this help"
30 @echo "venv : Rebuild local Python virtualenv from scratch"
31 @echo
32
33venv:
34 rm -fr ${VENVDIR}
35 @virtualenv ${VENVDIR}
36 @. ${VENVDIR}/bin/activate && \
37 if ! pip install -r requirements.txt; \
38 then \
39 echo "On MAC OS X, if the installation failed with an error \n'<openssl/opensslv.h>': file not found,"; \
40 echo "see the BUILD.md file for a workaround"; \
41 fi
42
43
44