Skip to content
Snippets Groups Projects
Commit 07580605 authored by Alex Bennée's avatar Alex Bennée Committed by Jerome Forissier
Browse files

common.mk: allow user to override launch-terminal in make run


Currently the code is hard coded to launch netcat via either xterm or
gnome-terminal. This is a little inflexible for people who spend a lot
of time in terminals. With the following you can now do:

  env QEMU_PATH=~/lsrc/qemu/qemu.git/ \
      LAUNCH_TERMINAL="tmux split-window" \
      make -j run

To bring your nc instances up in new tmux windows. The one downside is
titles aren't set as that wouldn't be maximally flexible for whatever
your launch command is.

Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
Acked-by: default avatarJoakim Bech <joakim.bech@linaro.org>
parent d5226385
No related branches found
No related tags found
No related merge requests found
......@@ -228,6 +228,12 @@ define run-help
@echo
endef
ifneq ("", $(LAUNCH_TERMINAL))
define launch-terminal
@nc -z 127.0.0.1 $(1) || \
$(LAUNCH_TERMINAL) $(SOC_TERM_PATH)/soc_term $(1) &
endef
else
gnome-terminal := $(shell command -v gnome-terminal 2>/dev/null)
xterm := $(shell command -v xterm 2>/dev/null)
ifdef gnome-terminal
......@@ -247,6 +253,7 @@ else
check-terminal := @echo "Error: could not find gnome-terminal nor xterm" ; false
endif
endif
endif
define wait-for-ports
@while ! nc -z 127.0.0.1 $(1) || ! nc -z 127.0.0.1 $(2); do sleep 1; done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment