mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-24 17:23:36 +02:00
jw-projects.py is now a multi-call executable, with "projects" being just one of its subcommands. Rename it to jw-pkg.py to reflect that. Signed-off-by: Jan Lindemann <jan@janware.com>
40 lines
1.3 KiB
Makefile
40 lines
1.3 KiB
Makefile
# == Variables for inter-project-communication
|
|
|
|
include $(JWBDIR)/make/platform.mk
|
|
|
|
# -- What do I know about myself?
|
|
VERSION_FILE := $(firstword $(wildcard VERSION) $(TOPDIR)/VERSION)
|
|
ifndef DEVELOPMENT
|
|
ifeq ($(wildcard $(VERSION_FILE)),)
|
|
DEVELOPMENT := true
|
|
else
|
|
DEVELOPMENT := $(shell grep -q 'dev' $(VERSION_FILE) && echo true)
|
|
endif
|
|
endif
|
|
|
|
# -- Conclude the build system's location:
|
|
ifeq ($(PROJECTS_DIR),)
|
|
ifeq ($(DEVELOPMENT),true)
|
|
PROJECTS_DIR ?= $(TOPDIR)/..
|
|
else
|
|
PROJECTS_DIR ?= /opt
|
|
endif
|
|
endif
|
|
|
|
# -- Query the build system about other projects:
|
|
|
|
ifndef WHICH
|
|
WHICH := $(firstword $(wildcard /usr/bin/which) $(shell which which))
|
|
endif
|
|
|
|
include $(JWBDIR)/make/py-version.mk
|
|
|
|
|
|
ifneq ($(TOPDIR),)
|
|
JW_PKG_PY = PYTHONPATH=$(JWBDIR)/src/python $(PYTHON) $(JWB_SCRIPT_DIR)/jw-pkg.py -p $(PROJECTS_DIR) -t $(TOPDIR) --topdir-format absolute $(JW_PKG_PY_EXTRA_OPTS)
|
|
proj_query_cmd = $(JW_PKG_PY) projects
|
|
proj_query = $(shell $(proj_query_cmd) $(1))
|
|
proj_dir = $(call proj_query,proj-dir $(1))
|
|
htdocs_dir = $(call proj_query,htdocs-dir $(1))
|
|
tmpl_dir = $(call proj_query,tmpl-dir $(1))
|
|
endif
|