2016-12-25 13:45:12 +00:00
|
|
|
# == Variables for inter-project-communication
|
|
|
|
|
|
2019-06-29 21:34:18 +00:00
|
|
|
include $(JWBDIR)/make/platform.mk
|
2019-03-02 19:59:53 +00:00
|
|
|
|
2016-12-25 13:45:12 +00:00
|
|
|
# -- What do I know about myself?
|
2019-03-03 18:12:28 +00:00
|
|
|
VERSION_FILE := $(firstword $(wildcard VERSION) $(TOPDIR)/VERSION)
|
2019-02-27 20:46:54 +00:00
|
|
|
ifndef DEVELOPMENT
|
|
|
|
|
ifeq ($(wildcard $(VERSION_FILE)),)
|
2019-03-03 18:12:28 +00:00
|
|
|
DEVELOPMENT := true
|
2019-02-27 20:46:54 +00:00
|
|
|
else
|
2019-03-03 18:12:28 +00:00
|
|
|
DEVELOPMENT := $(shell grep -q 'dev' $(VERSION_FILE) && echo true)
|
2019-02-27 20:46:54 +00:00
|
|
|
endif
|
2018-12-27 17:03:53 +00:00
|
|
|
endif
|
2016-12-25 13:45:12 +00:00
|
|
|
|
|
|
|
|
# -- Conclude the build system's location:
|
2019-06-24 12:44:14 +00:00
|
|
|
ifeq ($(PROJECTS_DIR),)
|
|
|
|
|
ifeq ($(DEVELOPMENT),true)
|
|
|
|
|
PROJECTS_DIR ?= $(TOPDIR)/..
|
|
|
|
|
else
|
|
|
|
|
PROJECTS_DIR ?= /opt
|
|
|
|
|
endif
|
2016-12-25 13:45:12 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
# -- Query the build system about other projects:
|
2019-06-24 12:44:14 +00:00
|
|
|
|
|
|
|
|
ifndef WHICH
|
|
|
|
|
WHICH := $(firstword $(wildcard /usr/bin/which) $(shell which which))
|
|
|
|
|
endif
|
|
|
|
|
|
2025-02-22 09:04:17 +00:00
|
|
|
include $(JWBDIR)/make/py-version.mk
|
2019-06-24 12:44:14 +00:00
|
|
|
|
2019-02-14 09:00:41 +00:00
|
|
|
ifneq ($(TOPDIR),)
|
2019-06-29 21:45:24 +00:00
|
|
|
proj_query_cmd = $(PYTHON) $(JWB_SCRIPT_DIR)/projects.py -p $(PROJECTS_DIR) -t $(TOPDIR) $(PROJECTS_PY_EXTRA_ARGS)
|
2019-03-03 18:12:28 +00:00
|
|
|
proj_query = $(shell $(proj_query_cmd) $(1))
|
|
|
|
|
proj_dir = $(call proj_query,proj-dir $(1))
|
|
|
|
|
htdocs_dir = $(call proj_query,htdocs-dir $(1))
|
2019-02-14 09:00:41 +00:00
|
|
|
endif
|