avoid spawning too many Nix shells

Achieved by:
- using := the 'git rev-parse' will be called after the shell is up
- adding the SHELL setting to the _startdev-% target

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-10-23 12:36:27 +02:00
parent 8ac531ed9c
commit 78095b0a2e
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,7 @@ HOST_OS := $(shell uname | tr '[:upper:]' '[:lower:]')
# This can come from Jenkins
ifndef BUILD_TAG
export BUILD_TAG = $(shell git rev-parse --short HEAD)
export BUILD_TAG := $(shell git rev-parse --short HEAD)
endif
# Defines which variables will be kept for Nix pure shell, use semicolon as divider
@ -322,6 +322,7 @@ _unknown-startdev-target-%:
${MAKE} _list | grep "watch-" | sed s/watch-/startdev-/; \
exit 1
_startdev-%: SHELL := /bin/sh
_startdev-%:
$(eval SYSTEM := $(word 2, $(subst -, , $@)))
$(eval DEVICE := $(word 3, $(subst -, , $@)))