-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.include
38 lines (29 loc) · 1.46 KB
/
Makefile.include
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
export BASEJUMP_IDF_TOOLS_DIR :=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
#===============================================================================
# Makefile.include
#
# This makefile is intended to be included at the top of other makefiles found
# in various bsg_pipeclean_suite designs. The main purpose of this makefile is
# to download and setup tools required for running our utility scripts.
#===============================================================================
PYPY3_BUILD_DIR :=$(BASEJUMP_IDF_TOOLS_DIR)/tools/pypy3
VIRTUALENV_BUILD_DIR :=$(BASEJUMP_IDF_TOOLS_DIR)/tools/virtual_env
PYTHON :=source $(VIRTUALENV_BUILD_DIR)/bin/activate; python
PIP :=source $(VIRTUALENV_BUILD_DIR)/bin/activate; pip
#===============================================================================
# TOOLS
#===============================================================================
tools: $(PYPY3_BUILD_DIR) $(VIRTUALENV_BUILD_DIR)
$(PYPY3_BUILD_DIR):
mkdir -p $@/download
cd $@/download; wget https://bitbucket.org/squeaky/portable-pypy/downloads/pypy3.5-7.0.0-linux_x86_64-portable.tar.bz2
cd $@; tar xvf download/pypy3.5-7.0.0-linux_x86_64-portable.tar.bz2
cd $@; mv pypy3.5-7.0.0-linux_x86_64-portable/* .
cd $@; rmdir pypy3.5-7.0.0-linux_x86_64-portable
$(VIRTUALENV_BUILD_DIR):
mkdir -p $(@D)
virtualenv -p $(PYPY3_BUILD_DIR)/bin/pypy3 $@
$(PIP) install pyparsing
clean_tools:
rm -rf $(PYPY3_BUILD_DIR)
rm -rf $(VIRTUALENV_BUILD_DIR)