-
Notifications
You must be signed in to change notification settings - Fork 0
/
Prerequisites.mk
64 lines (53 loc) · 2.25 KB
/
Prerequisites.mk
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
#################################################################################################
#
# Copyright (c) 2014 Institute for Electronic Design Automation, TU Munich
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# author Marc Greim <marc.greim@mytum.de>
#
# date June 24, 2014
#
# version 0.1
#
# This makefile include contains code to check prerequisites for building or
# executing ETISS. Configuration detection should be done in this file too
#
###############################################################################################
python_version_full := $(wordlist 2,4,$(subst ., ,$(shell python -V 2>&1)))
python_version_major := $(word 1,${python_version_full})
python_version_minor := $(word 2,${python_version_full})
python_version_patch := $(word 3,${python_version_full})
TARGET_CHECK_BUILD+= script/etiss/cpplint.py
ifneq ($(ETISS_USE_PYTHON),0)
TARGET_CHECK_BUILD+= build/se_check_python
endif
Prerequisites_all: all
build/se_check_python:
mkdir -p build
touch build/se_check_python
@if [ ${python_version_major} -eq 2 ] ; then \
if [ ${python_version_minor} -lt 7 ] ; then \
echo "ERORR: wrong python version. Upgrade to version 2.7"; \
exit 1;\
elif [ ${python_version_minor} -gt 7 ] ; then \
echo "NOTE: phyton scripts have only been tested with python version 2.7";\
fi \
elif [ ${python_version_major} -gt 2 ] ; then \
echo "NOTE: phyton scripts have only been tested with python version 2.7";\
elif [ ${python_version_major} -lt 2 ] ; then \
echo "ERORR: wrong python version. Upgrade to version 2.7"; \
exit 1;\
fi
script/etiss/cpplint.py:
-mkdir -p script/etiss/
-cd script/etiss/ && wget http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py