projects-dir.mk: Implement niftier fallback for undefined JANWARE_USER

Take JANWARE_USER from CVS/Root if it's there

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2018-03-08 10:33:59 +00:00
commit f086a9b18a

View file

@ -60,8 +60,14 @@ endif
BUILD_PROJECTS = $(filter-out $(EXCLUDE_FROM_BUILD),$(PROJECTS))
ifndef JANWARE_USER
export JANWARE_USER = $(shell id -un)
ifneq ($(wildcard CVS/Root),)
JANWARE_USER = $(shell sed '/^:ext/ !d; s/:ext:\([^@]\+\)@.*/\1/' CVS/Root)
$(info Taking JANWARE_USER=$(JANWARE_USER) from CVS/Root)
else
JANWARE_USER = $(shell id -un)
endif
$(warning Assuming JANWARE_USER=$(JANWARE_USER), explicitly set environment variable to turn off this warning!)
export JANWARE_USER
endif
ifeq ($(JANWARE_USER),)