diff options
author | Elliott Sales de Andrade <[email protected]> | 2019-09-24 04:50:25 -0400 |
---|---|---|
committer | Ron Evans <[email protected]> | 2019-09-25 12:04:38 +0200 |
commit | 9aace7929805c4bb0856d40459c6a04100516eff (patch) | |
tree | 1f305ba250f898ea31ebcd3060dad72acdcdfa83 /Makefile | |
parent | c16e07469be3354fd0784e822b57c1e47e9d79ea (diff) | |
download | tinygo-9aace7929805c4bb0856d40459c6a04100516eff.tar.gz tinygo-9aace7929805c4bb0856d40459c6a04100516eff.zip |
Allow overridding Python used for generators.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -15,6 +15,9 @@ export GOROOT = $(shell $(GO) env GOROOT) # md5sum binary MD5SUM = md5sum +# Python binary +PYTHON ?= python + # Use CCACHE for LLVM if possible ifneq (, $(shell which ccache)) CCACHE_LLVM_OPTION = '-DLLVM_CCACHE_BUILD=ON' @@ -58,24 +61,24 @@ fmt-check: gen-device: gen-device-avr gen-device-nrf gen-device-sam gen-device-sifive gen-device-stm32 gen-device-avr: - ./tools/gen-device-avr.py lib/avr/packs/atmega src/device/avr/ - ./tools/gen-device-avr.py lib/avr/packs/tiny src/device/avr/ + $(PYTHON) ./tools/gen-device-avr.py lib/avr/packs/atmega src/device/avr/ + $(PYTHON) ./tools/gen-device-avr.py lib/avr/packs/tiny src/device/avr/ GO111MODULE=off $(GO) fmt ./src/device/avr gen-device-nrf: - ./tools/gen-device-svd.py lib/nrfx/mdk/ src/device/nrf/ --source=https://github.com/NordicSemiconductor/nrfx/tree/master/mdk + $(PYTHON) ./tools/gen-device-svd.py lib/nrfx/mdk/ src/device/nrf/ --source=https://github.com/NordicSemiconductor/nrfx/tree/master/mdk GO111MODULE=off $(GO) fmt ./src/device/nrf gen-device-sam: - ./tools/gen-device-svd.py lib/cmsis-svd/data/Atmel/ src/device/sam/ --source=https://github.com/posborne/cmsis-svd/tree/master/data/Atmel + $(PYTHON) ./tools/gen-device-svd.py lib/cmsis-svd/data/Atmel/ src/device/sam/ --source=https://github.com/posborne/cmsis-svd/tree/master/data/Atmel GO111MODULE=off $(GO) fmt ./src/device/sam gen-device-sifive: - ./tools/gen-device-svd.py lib/cmsis-svd/data/SiFive-Community/ src/device/sifive/ --source=https://github.com/AdaCore/svd2ada/tree/master/CMSIS-SVD/SiFive-Community + $(PYTHON) ./tools/gen-device-svd.py lib/cmsis-svd/data/SiFive-Community/ src/device/sifive/ --source=https://github.com/AdaCore/svd2ada/tree/master/CMSIS-SVD/SiFive-Community GO111MODULE=off $(GO) fmt ./src/device/sifive gen-device-stm32: - ./tools/gen-device-svd.py lib/cmsis-svd/data/STMicro/ src/device/stm32/ --source=https://github.com/posborne/cmsis-svd/tree/master/data/STMicro + $(PYTHON) ./tools/gen-device-svd.py lib/cmsis-svd/data/STMicro/ src/device/stm32/ --source=https://github.com/posborne/cmsis-svd/tree/master/data/STMicro GO111MODULE=off $(GO) fmt ./src/device/stm32 |