From ac476f10c22168d570b68612a5df46b44b910bcf Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Wed, 21 Nov 2018 13:34:10 +0000 Subject: [PATCH] projects-dir.mk: Introduce and evalutate JW_BUILD_VERBOSE Most notably, ssh-wrapper.sh doesn't run ssh with -x anylonger, if JW_BUILD_VERBOSE is not set to true Signed-off-by: Jan Lindemann --- make/projects-dir.mk | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/make/projects-dir.mk b/make/projects-dir.mk index 232a6d75..af454789 100644 --- a/make/projects-dir.mk +++ b/make/projects-dir.mk @@ -13,18 +13,30 @@ # might take you there semi-automatically. # -# ------------ Makefile and environment variables +# ------------ Makefile and environment variable definitions -include local.mk -SHELL = /bin/bash -o pipefail +SHELL = /bin/bash -o pipefail +PROJECTS_TXT ?= projects.txt +JW_BUILD_VERBOSE ?= false +BASE_PACKAGES = cvs git make sudo +EXCLUDE_FROM_BUILD += \ + dspider-btools \ + dspider-shared \ + feedfs-dspcd \ + casview \ + dspfs \ + jux3 \ + emscren-v8 + + +# ------------ evaluate Makefile and environment variables ifneq ($(PROJECTS),) export PGIT_CLONE_PROJECTS = $(PROJECTS) endif -PROJECTS_TXT ?= projects.txt - ifneq ($(wildcard $(PROJECTS_TXT)),) PROJECTS ?= $(shell cat $(PROJECTS_TXT) | sed '/^ *\#/ d') # TODO: this could be nicer @@ -34,16 +46,11 @@ else CVS_PROJECTS = $(filter $(dir $(wildcard */CVS)),$(PROJECTS)) endif -BASE_PACKAGES = cvs git make sudo +ifeq ($(JW_BUILD_VERBOSE),true) + SSH_WRAPPER_TRACE ?= -x +endif -EXCLUDE_FROM_BUILD += \ - dspider-btools \ - dspider-shared \ - feedfs-dspcd \ - casview \ - dspfs \ - jux3 \ - emscren-v8 +export JW_BUILD_VERBOSE # ------------ external programs I @@ -370,7 +377,7 @@ links.done: touch $@ $(SSH_WRAPPER_SH): Makefile - /bin/echo -e '#!/bin/bash -x\n\nexec /usr/bin/ssh $$JW_BUILD_SSH_EXTRA_OPTS "$$@"' > $@.tmp + /bin/echo -e '#!/bin/bash $(SSH_WRAPPER_TRACE)\n\nexec /usr/bin/ssh $$JW_BUILD_SSH_EXTRA_OPTS "$$@"' > $@.tmp chmod 700 $@.tmp mv $@.tmp $@ ssh-wrapper: $(SSH_WRAPPER_SH)