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 <jan@janware.com>
This commit is contained in:
Jan Lindemann 2018-11-21 13:34:10 +00:00
commit ac476f10c2

View file

@ -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)