Skip to content

Commit

Permalink
Allow overridding Python used for generators.
Browse files Browse the repository at this point in the history
  • Loading branch information
QuLogic authored and deadprogram committed Sep 25, 2019
1 parent c16e074 commit 9aace79
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit 9aace79

Please sign in to comment.