projects-dir.mk: Splut up PROJECTS_PY_EXTRA_ARGS

Split up PROJECTS_PY_EXTRA_ARGS into _EXTRA_OPTS and
_EXTRA_BUILD_OPTS.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2018-03-08 09:45:38 +00:00
commit c352f8a15b

View file

@ -89,13 +89,14 @@ else
endif
ifneq ($(EXCLUDE_FROM_BUILD),)
PROJECTS_PY_EXTRA_ARGS += --exclude "$(EXCLUDE_FROM_BUILD)"
PROJECTS_PY_EXTRA_BUILD_OPTS += --exclude "$(EXCLUDE_FROM_BUILD)"
endif
# ------------ external programs II
PGIT = CLONE_PROJECTS="$(PROJECTS)" /bin/bash $(MOD_SCRIPT_DIR)/pgit.sh
PROJECTS_PY = python2 $(MOD_SCRIPT_DIR)/projects.py --prefix $(shell pwd) $(PROJECTS_PY_EXTRA_ARGS)
PROJECTS_PY = python2 $(MOD_SCRIPT_DIR)/projects.py --prefix $(shell pwd) $(PROJECTS_PY_EXTRA_OPTS)
PROJECTS_PY_BUILD = $(PROJECTS_PY) $(PROJECTS_PY_EXTRA_BUILD_OPTS)
PURGE_SH = /bin/bash $(firstword $(wildcard $(MOD_SCRIPT_DIR)/purge-stale-projects.sh /opt/jw-build/bin/purge-stale-projects.sh) purge-not-found)
RELEASE_SH = /bin/bash $(firstword $(wildcard $(MOD_SCRIPT_DIR)/build-release.sh /opt/jw-build/bin/build-release.sh) release-not-found)
PKG_MANAGER_SH ?= /bin/bash $(firstword $(wildcard $(MOD_SCRIPT_DIR)/pkg-manager.sh /opt/jw-build/bin/pkg-manager.sh) pkg-manager-not-found)
@ -109,7 +110,7 @@ CVS_ADMIN_SH = JW_BUILD_SSH_EXTRA_OPTS="$(JW_BUILD_SSH_EXTRA_OPTS)" $(G
# ------------ targets
all: $(filter-out $(UNAVAILABLE_TARGETS),pull.done links.done)
$(PROJECTS_PY) build $@ $(BUILD_PROJECTS)
$(PROJECTS_PY_BUILD) $@ $(BUILD_PROJECTS)
clean: clean-dirs done.clean
distclean: clean-all-dirs done.clean
install:
@ -120,20 +121,19 @@ install:
@exit 1
build-order: $(filter-out $(UNAVAILABLE_TARGETS),pull.done)
$(PROJECTS_PY) build order $(BUILD_PROJECTS) $(PROJECTS_PY_EXTRA_ARGS) | sed 's/ */\n/g'
$(PROJECTS_PY_BUILD) order $(BUILD_PROJECTS) | sed 's/ */\n/g'
clean-dirs:
if [ -n "$(wildcard */*.done)" ]; then ls */*.done 2>/dev/null | sed 's%/.*%%' | xargs -r $(PROJECTS_PY) build --exclude "" clean; fi
if [ -n "$(wildcard */*.done)" ]; then ls */*.done 2>/dev/null | sed 's%/.*%%' | xargs -r $(PROJECTS_PY_BUILD) --exclude "" clean; fi
clean-all-dirs:
$(PROJECTS_PY) build clean $(PROJECTS)
$(PROJECTS_PY_BUILD) clean $(PROJECTS)
echo-prereq-build:
@$(PROJECTS_PY) requires-pkg --skip-excluded --flavours "build" $(BUILD_PROJECTS)
echo-prereq-release:
@$(PROJECTS_PY) requires-pkg --skip-excluded --flavours "build run release" $(BUILD_PROJECTS)
echo-os:
@$(GET_OS_SH)
@ -172,7 +172,7 @@ pkg-init-%:
$(CREATE_PROJECT_SH) $*
pkg-%: $(filter-out $(UNAVAILABLE_TARGETS),pull.done)
$(PROJECTS_PY) build $@ $(BUILD_PROJECTS)
$(PROJECTS_PY_BUILD) $@ $(BUILD_PROJECTS)
doc-project doc-module:
$(BROWSER) $(firstword $(shell sed '/https:/ !d; s%.*https%https%; s/ .*//' $(firstword $(MAKEFILE_LIST))))