2026-05-26 10:34:17 +02:00
|
|
|
# Need second expansion for TD_COPY_XXX concatenation rule to work
|
|
|
|
|
.SECONDEXPANSION:
|
|
|
|
|
|
2026-05-28 07:14:26 +02:00
|
|
|
.PHONY: \
|
|
|
|
|
FORCE \
|
|
|
|
|
all \
|
|
|
|
|
format \
|
2026-07-02 14:41:56 +02:00
|
|
|
canonicalize-remotes \
|
2026-05-28 07:14:26 +02:00
|
|
|
check-syntax \
|
|
|
|
|
check-format \
|
|
|
|
|
check \
|
|
|
|
|
install \
|
|
|
|
|
clean \
|
|
|
|
|
distclean \
|
|
|
|
|
config \
|
|
|
|
|
mrproper \
|
|
|
|
|
unlocal \
|
|
|
|
|
topdir.distclean \
|
|
|
|
|
topdir.clean \
|
|
|
|
|
topdir.mrproper \
|
|
|
|
|
topdir.install \
|
|
|
|
|
do-install-links \
|
|
|
|
|
install-links \
|
|
|
|
|
get-maintainer \
|
|
|
|
|
get-official \
|
|
|
|
|
get-pub \
|
|
|
|
|
git-init \
|
|
|
|
|
git-init-from-cvs \
|
|
|
|
|
git-config \
|
|
|
|
|
git-clone-to-remote \
|
|
|
|
|
git-import \
|
|
|
|
|
git-init-remote \
|
|
|
|
|
git-descr \
|
|
|
|
|
git-update-project-description \
|
|
|
|
|
install-deps-devel \
|
|
|
|
|
streamline \
|
|
|
|
|
git-ssh \
|
|
|
|
|
git-get-official \
|
|
|
|
|
git-get-maintainer \
|
|
|
|
|
git-get-pub \
|
|
|
|
|
pkg-manager-refresh \
|
|
|
|
|
pkg-install-build-deps \
|
|
|
|
|
pkg-install-release-deps \
|
|
|
|
|
pkg-install-testbuild-deps \
|
|
|
|
|
recache-vars \
|
2026-07-02 14:41:56 +02:00
|
|
|
test
|
2007-08-16 18:03:28 +00:00
|
|
|
|
2019-01-30 16:23:07 +00:00
|
|
|
ifeq ($(ORDERED_SUBDIRS),)
|
2026-05-28 07:14:26 +02:00
|
|
|
SUBDIRS ?= $(dir $(wildcard $(addsuffix /Makefile,\
|
|
|
|
|
inst/pre make scripts contrib src libsrc \
|
|
|
|
|
tools include lib bin util exe plugins conf config cfg \
|
|
|
|
|
images htdocs tmpl doc test inst/post)))
|
2019-01-30 16:23:07 +00:00
|
|
|
endif
|
|
|
|
|
|
2019-03-13 15:45:01 +00:00
|
|
|
ifeq ($(USE_USER_URL),true)
|
|
|
|
|
JANWARE_USER_PREFIX = $(JANWARE_USER)@
|
|
|
|
|
endif
|
|
|
|
|
|
2019-03-03 18:12:28 +00:00
|
|
|
PROJECT_DESCR = $(TOPDIR)/make/project.conf
|
|
|
|
|
GIT_DESCR = $(TOPDIR)/.git/description
|
2025-11-24 11:22:56 +01:00
|
|
|
GIT_MAIN_BRANCH ?= master
|
2016-11-27 15:55:08 +00:00
|
|
|
|
2019-03-03 18:12:28 +00:00
|
|
|
OPT_JANWARE_PROJECT ?= -j
|
2026-01-28 08:10:09 +01:00
|
|
|
INTERACTIVE ?= auto
|
2026-04-24 11:04:22 +02:00
|
|
|
PKG_MANAGER ?= $(JW_PKG_PY) --interactive=$(INTERACTIVE) pkg
|
2016-11-27 15:55:08 +00:00
|
|
|
|
|
|
|
|
ifeq ($(OPT_JANWARE_PROJECT),-j)
|
2026-05-28 07:14:26 +02:00
|
|
|
REMOTE_GIT_FLAVOUR ?= proj
|
2016-11-27 15:55:08 +00:00
|
|
|
else
|
2026-05-28 07:14:26 +02:00
|
|
|
OPT_JANWARE_PROJECT =
|
|
|
|
|
REMOTE_GIT_FLAVOUR ?= priv
|
2016-11-27 15:55:08 +00:00
|
|
|
endif
|
|
|
|
|
|
2007-08-16 19:04:22 +00:00
|
|
|
ifneq ($(wildcard $(TOPDIR)/make/defs.mk),)
|
2009-05-27 11:26:17 +00:00
|
|
|
include $(TOPDIR)/make/defs.mk
|
|
|
|
|
endif
|
2007-08-16 18:03:28 +00:00
|
|
|
|
2019-06-29 21:34:18 +00:00
|
|
|
include $(JWBDIR)/make/defs.mk
|
2016-12-07 13:30:06 +00:00
|
|
|
|
2026-04-12 13:46:02 +02:00
|
|
|
REMOTE_GIT_DIR = /$(JANWARE_USER)/$(REMOTE_GIT_FLAVOUR)/$(PROJECT)
|
2026-05-12 15:09:37 +02:00
|
|
|
REMOTE_GIT_URL = ssh://$(JANWARE_USER_PREFIX)devgit.janware.com$(REMOTE_GIT_DIR)
|
2016-12-07 13:30:06 +00:00
|
|
|
|
2019-02-28 16:12:58 +00:00
|
|
|
ifneq ($(DONT_CHECK_PREREQ_DONE),true)
|
2026-06-17 14:08:58 +02:00
|
|
|
ifndef PREREQ_DIRS_BUILD
|
|
|
|
|
PREREQ_DIRS_BUILD := $(call proj_query,proj-dir $(PREREQ_BUILD))
|
2019-02-28 16:12:58 +00:00
|
|
|
endif
|
2026-06-17 14:08:58 +02:00
|
|
|
PREREQ_DIRS_BUILD_DONE := $(addsuffix /dirs-all.done,$(filter-out $(TOPDIR) /opt/%,$(PREREQ_DIRS_BUILD)))
|
2019-02-28 16:12:58 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
ifneq ($(SUBDIRS_TO_ITERATE),)
|
|
|
|
|
ifeq ($(MAKECMDGOALS),)
|
2019-03-03 18:12:28 +00:00
|
|
|
SUBDIR_TARGETS = all
|
2019-02-28 16:12:58 +00:00
|
|
|
else
|
2019-03-03 18:12:28 +00:00
|
|
|
SUBDIR_TARGETS = $(filter $(ALLOWED_SUBDIR_TARGETS),$(MAKECMDGOALS))
|
2019-02-28 16:12:58 +00:00
|
|
|
endif
|
|
|
|
|
endif
|
|
|
|
|
|
2026-06-04 23:10:07 +02:00
|
|
|
all: topdir config
|
2026-07-02 14:41:56 +02:00
|
|
|
test: all
|
2026-06-04 23:10:07 +02:00
|
|
|
|
2019-07-01 17:37:10 +00:00
|
|
|
include $(JWBDIR)/make/dirs.mk
|
2026-03-16 13:51:11 +01:00
|
|
|
include $(JWBDIR)/make/pkg-dist.mk
|
2019-06-29 21:34:18 +00:00
|
|
|
include $(JWBDIR)/make/rules.mk
|
|
|
|
|
include $(JWBDIR)/make/doc-rules.mk
|
|
|
|
|
include $(JWBDIR)/make/list-files.mk
|
2026-02-17 18:13:22 +01:00
|
|
|
include $(JWBDIR)/make/projects+project.mk
|
cache.mk: Include from topdir.mk, not make.mk
During a topdir "make all", caching variables is currently not the
first thing that happens. Instead, variables are cached as soon as a
project recurses into the make subdirectory. That was necessary,
because some makefiles were regenerated in the make subdirectory by
autoconf, potentially contributing variables that needed to be
cached.
As of now, autoconf is long gone and this is no longer true. And for
some variables, the two step process becomes involved, notably for
PYTHONPATH, which coding agents would like to look at from the topdir
very early on.
This commit moves the .project-cache.mk creation to topdir.mk, and
.projects-cache.mk creation to jw-pkg/Makefile to address that.
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-07-09 07:44:35 +02:00
|
|
|
include $(JWBDIR)/make/cache.mk
|
2007-08-16 18:03:28 +00:00
|
|
|
|
2019-06-29 21:45:24 +00:00
|
|
|
STREAMLINE_PROJECT ?= bash $(JWB_SCRIPT_DIR)/streamline-project.sh
|
2015-12-12 12:46:58 +00:00
|
|
|
|
2019-03-03 18:12:28 +00:00
|
|
|
INSTALLED_TOPDIR_FILES = $(addprefix $(INSTALL_DOCDIR)/, $(DOCS))
|
2007-08-22 14:42:53 +00:00
|
|
|
|
2026-05-26 10:34:17 +02:00
|
|
|
TD_CONF_DIR ?= $(JW_PKG_CONF_BASE_DIR)/topdir
|
|
|
|
|
TD_COPY_SRC ?= $(TD_CONF_DIR)
|
|
|
|
|
TD_COPY_FILES ?= $(filter-out Makefile,$(notdir $(wildcard $(TD_COPY_SRC)/*)))
|
|
|
|
|
# -- Internal variables, define JW_PKG_TOPDIR_COPY_PATH if you want to
|
|
|
|
|
# add more files appended to the target files
|
|
|
|
|
TD_COPY_SRC_PATH = $(subst :,$(space),$(JW_PKG_TOPDIR_COPY_PATH))
|
cache.mk: Include from topdir.mk, not make.mk
During a topdir "make all", caching variables is currently not the
first thing that happens. Instead, variables are cached as soon as a
project recurses into the make subdirectory. That was necessary,
because some makefiles were regenerated in the make subdirectory by
autoconf, potentially contributing variables that needed to be
cached.
As of now, autoconf is long gone and this is no longer true. And for
some variables, the two step process becomes involved, notably for
PYTHONPATH, which coding agents would like to look at from the topdir
very early on.
This commit moves the .project-cache.mk creation to topdir.mk, and
.projects-cache.mk creation to jw-pkg/Makefile to address that.
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-07-09 07:44:35 +02:00
|
|
|
TD_GENERATE_FILES += $(TD_COPY_FILES) $(CACHE_PROJECT_MK)
|
2026-05-26 10:34:17 +02:00
|
|
|
|
2026-07-02 14:41:56 +02:00
|
|
|
test: all
|
2026-06-01 09:24:08 +02:00
|
|
|
format: topdir
|
2026-05-26 10:34:17 +02:00
|
|
|
check-syntax: topdir
|
|
|
|
|
check-format: topdir
|
2026-05-28 07:14:26 +02:00
|
|
|
check: check-syntax check-format
|
2026-06-01 13:38:55 +02:00
|
|
|
@echo "Static code checks completed successfully!"
|
2026-05-28 07:14:26 +02:00
|
|
|
install: topdir.install
|
|
|
|
|
clean: topdir.clean
|
|
|
|
|
distclean: topdir.distclean
|
|
|
|
|
config:
|
|
|
|
|
mrproper:distclean topdir.mrproper
|
|
|
|
|
|
|
|
|
|
local-%: FORCE
|
2006-05-26 14:07:43 +00:00
|
|
|
find . -name $@.mk | \
|
2006-06-01 09:10:30 +00:00
|
|
|
while read f; do (\
|
|
|
|
|
cd `dirname $$f` ;\
|
2017-09-02 19:26:52 +00:00
|
|
|
$(RM) -f local.mk ;\
|
2006-06-01 09:10:30 +00:00
|
|
|
ln -s `basename $$f` local.mk ;\
|
|
|
|
|
) done
|
2006-05-26 14:07:43 +00:00
|
|
|
|
|
|
|
|
unlocal:
|
2017-09-02 19:26:52 +00:00
|
|
|
$(RM) -f $(shell find . -name local.mk)
|
2007-05-23 11:30:53 +00:00
|
|
|
|
2026-06-01 13:38:55 +02:00
|
|
|
topdir: $$(TD_GENERATE_FILES)
|
2026-05-26 10:34:17 +02:00
|
|
|
topdir.clean:
|
|
|
|
|
$(RM) -rf *.done $(TD_GENERATE_FILES)
|
|
|
|
|
clean: topdir.clean
|
2019-01-30 16:23:20 +00:00
|
|
|
topdir.distclean: topdir.clean
|
|
|
|
|
$(RM) -rf dist *.dist
|
2026-05-26 10:34:17 +02:00
|
|
|
distclean: topdir.distclean
|
2019-01-30 16:23:20 +00:00
|
|
|
topdir.mrproper: topdir.distclean
|
2017-09-02 19:26:52 +00:00
|
|
|
find . -name '*.rep' | xargs -r $(RM) -f
|
2007-08-22 14:42:53 +00:00
|
|
|
|
2007-09-04 21:52:28 +00:00
|
|
|
topdir.install: prefix.done $(INSTALLED_TOPDIR_FILES)
|
|
|
|
|
|
2011-02-20 14:15:22 +00:00
|
|
|
do-install-links:
|
2026-01-25 17:34:53 +01:00
|
|
|
$(Q)@cwd=$(shell $(PWD)); \
|
2011-02-20 14:15:22 +00:00
|
|
|
echo "o in $(INSTALL_LIBDIR):" ;\
|
|
|
|
|
find lib -name '*.so' -o -name '*.so.*' -o -name '*.a' -o -name '*.dll' | \
|
2012-02-04 10:59:02 +00:00
|
|
|
$(SED) 's%^\./%%' | \
|
2011-02-20 14:15:22 +00:00
|
|
|
while read f; do \
|
2011-05-15 18:28:19 +00:00
|
|
|
cd $(INSTALL_LIBDIR) && { \
|
|
|
|
|
echo " sudo ln -sf $$cwd/$$f" ; \
|
|
|
|
|
sudo ln -sf $$cwd/$$f; \
|
|
|
|
|
}; \
|
2011-02-20 14:15:22 +00:00
|
|
|
done; \
|
|
|
|
|
echo "o in $(INSTALL_EXEDIR):" ;\
|
|
|
|
|
find bin -type f -a -perm -u+x | \
|
2012-02-04 10:59:02 +00:00
|
|
|
$(SED) 's%^\./%%' | \
|
2011-02-20 14:15:22 +00:00
|
|
|
while read f; do \
|
2011-05-15 18:28:19 +00:00
|
|
|
cd $(INSTALL_EXEDIR) && { \
|
|
|
|
|
echo " sudo ln -sf $$cwd/$$f" ; \
|
|
|
|
|
sudo ln -sf $$cwd/$$f; \
|
|
|
|
|
}; \
|
|
|
|
|
done ;\
|
|
|
|
|
echo "o in $(INSTALL_HDRDIR):" ;\
|
|
|
|
|
find include -name '*.h' | \
|
2012-02-04 10:59:02 +00:00
|
|
|
$(SED) 's%^\./%%' | \
|
2011-05-15 18:28:19 +00:00
|
|
|
while read f; do \
|
|
|
|
|
cd $(INSTALL_HDRDIR) && { \
|
|
|
|
|
echo " sudo ln -sf $$cwd/$$f" ; \
|
|
|
|
|
sudo ln -sf $$cwd/$$f; \
|
|
|
|
|
}; \
|
|
|
|
|
done; \
|
|
|
|
|
echo "o in $(INSTALL_MAKEDIR):" ;\
|
|
|
|
|
find make -name '*.mk' | \
|
2012-02-04 10:59:02 +00:00
|
|
|
$(SED) 's%^\./%%' | \
|
2011-05-15 18:28:19 +00:00
|
|
|
while read f; do \
|
|
|
|
|
cd $(INSTALL_MAKEDIR) && { \
|
|
|
|
|
echo " sudo ln -sf $$cwd/$$f" ; \
|
|
|
|
|
sudo ln -sf $$cwd/$$f; \
|
|
|
|
|
}; \
|
|
|
|
|
done; \
|
2012-01-30 14:59:21 +00:00
|
|
|
|
2016-04-20 14:37:09 +00:00
|
|
|
install-links:
|
|
|
|
|
DEVELOPMENT=false make do-install-links
|
|
|
|
|
|
2026-02-21 11:27:56 +01:00
|
|
|
get-maintainer: git-get-maintainer
|
2026-03-16 05:55:27 +01:00
|
|
|
get-official: git-get-official
|
2026-05-14 12:37:34 +02:00
|
|
|
get-pub: git-get-pub
|
2026-02-21 11:27:56 +01:00
|
|
|
|
2016-04-20 14:37:09 +00:00
|
|
|
git-init: git-init.done $(GIT_DESCR)
|
2014-06-24 18:49:35 +00:00
|
|
|
|
2013-05-30 12:50:42 +00:00
|
|
|
git-init-from-cvs: git-init
|
2017-05-25 09:54:57 +00:00
|
|
|
$(LIST_VCS_FILES) -f | xargs git add
|
2026-03-16 13:51:11 +01:00
|
|
|
git commit -m "First commit of $(PKG_VERSION)"
|
2012-01-30 14:59:21 +00:00
|
|
|
|
2013-06-11 13:49:54 +00:00
|
|
|
git-config:
|
2019-03-13 15:45:01 +00:00
|
|
|
git config --global user.name || git config --global user.name "$(FULL_NAME)"
|
|
|
|
|
git config --global user.email || git config --global user.email $(JANWARE_USER)@janware.com
|
|
|
|
|
git remote -v | grep -q '^origin' || git remote add origin $(REMOTE_GIT_URL)
|
|
|
|
|
git remote -v | grep -q "^origin *$(REMOTE_GIT_URL)" || git remote set-url --push origin $(REMOTE_GIT_URL)
|
2013-06-11 13:49:54 +00:00
|
|
|
|
|
|
|
|
git-clone-to-remote:
|
2026-05-12 15:09:37 +02:00
|
|
|
ssh $(JANWARE_USER)@devgit.janware.com "/opt/jw-pkg/bin/git-srv-admin.sh $(OPT_JANWARE_PROJECT) create-personal-project $(PROJECT)"
|
2019-03-13 15:45:01 +00:00
|
|
|
make git-config
|
2025-11-24 11:22:56 +01:00
|
|
|
git push --set-upstream origin $(GIT_MAIN_BRANCH)
|
2014-06-25 12:45:15 +00:00
|
|
|
git push --all $(REMOTE_GIT_URL)
|
2019-01-03 11:33:31 +00:00
|
|
|
make git-update-project-description
|
2012-09-02 16:06:47 +00:00
|
|
|
|
2014-06-24 18:49:35 +00:00
|
|
|
git-import: git-init git-config
|
2013-06-11 13:49:54 +00:00
|
|
|
git add -A
|
2016-05-08 13:11:06 +00:00
|
|
|
git status
|
2026-02-18 19:21:11 +01:00
|
|
|
git commit -am "First commit"
|
2013-06-11 13:49:54 +00:00
|
|
|
|
2016-04-20 14:37:09 +00:00
|
|
|
git-init-remote: git-import git-clone-to-remote
|
|
|
|
|
|
|
|
|
|
git-descr: $(GIT_DESCR)
|
2013-06-11 13:49:54 +00:00
|
|
|
|
2017-04-12 19:45:36 +00:00
|
|
|
git-update-project-description:
|
2026-05-12 15:09:37 +02:00
|
|
|
ssh $(JANWARE_USER)@devgit.janware.com "/opt/jw-pkg/bin/git-srv-admin.sh $(OPT_JANWARE_PROJECT) update-descriptions $(PROJECT)"
|
2017-04-12 19:45:36 +00:00
|
|
|
|
2026-05-28 07:14:26 +02:00
|
|
|
projects-%: FORCE
|
2026-01-28 07:56:33 +01:00
|
|
|
$(PYTHON) $(JWB_SCRIPT_DIR)/jw-pkg.py projects build $* $(PROJECT)
|
2012-04-30 07:56:35 +00:00
|
|
|
|
2014-10-23 13:14:54 +00:00
|
|
|
install-deps-devel:
|
2026-03-16 13:51:11 +01:00
|
|
|
sudo zypper in $(shell echo $(PKG_REQUIRES_DEVEL) | sed "s/ *= */-/g; s/ [^ ]\+-__NEXT_VERSION__//")
|
2014-10-23 13:14:54 +00:00
|
|
|
|
2015-12-12 12:46:58 +00:00
|
|
|
streamline:
|
|
|
|
|
$(STREAMLINE_PROJECT)
|
|
|
|
|
|
2016-04-20 14:37:09 +00:00
|
|
|
$(GIT_DESCR): $(PROJECT_DESCR_FILE)
|
2019-06-29 21:45:24 +00:00
|
|
|
/bin/bash $(JWB_SCRIPT_DIR)/ini-section.sh summary $< | tee $@.tmp
|
2016-04-20 14:37:09 +00:00
|
|
|
mv $@.tmp $@
|
|
|
|
|
|
|
|
|
|
git-init.done:
|
2026-01-25 17:34:53 +01:00
|
|
|
$(Q)if [ -e .git ]; then \
|
2016-04-20 14:37:09 +00:00
|
|
|
echo $(TOPDIR)/.git already exists, not running git init ;\
|
|
|
|
|
else \
|
2019-03-13 15:45:01 +00:00
|
|
|
@echo git init ;\
|
2016-04-20 14:37:09 +00:00
|
|
|
git init; \
|
|
|
|
|
fi
|
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
|
|
prefix.done:
|
|
|
|
|
mkdir -p $(PREFIX)
|
|
|
|
|
touch $@
|
|
|
|
|
|
2019-12-07 19:21:08 +00:00
|
|
|
echo-build-deps:
|
2026-03-15 13:20:14 +01:00
|
|
|
$(Q)echo $(call proj_query, required-os-pkg --quote "build" $(PROJECT))
|
2017-04-05 13:31:19 +00:00
|
|
|
|
2026-05-28 07:14:26 +02:00
|
|
|
git-ssh-%: FORCE
|
2018-10-18 18:30:17 +00:00
|
|
|
bash -c "`git remote get-url --push $* | sed 's|ssh://||; s|\([^/]\+\)/\(.*\)|LC_CDPATH=/\2 ssh -o SendEnv=LC_CDPATH \1|'`"
|
|
|
|
|
git-ssh: git-ssh-origin
|
2018-12-16 18:45:24 +00:00
|
|
|
|
2026-02-21 09:29:11 +01:00
|
|
|
git-get-official:
|
|
|
|
|
make git-get-devops
|
2025-11-24 11:34:03 +01:00
|
|
|
|
2026-02-21 09:29:11 +01:00
|
|
|
git-get-maintainer:
|
|
|
|
|
make git-get-$(call proj_query,getval global jw-maintainer)
|
2025-11-24 11:22:56 +01:00
|
|
|
|
2026-05-14 12:37:34 +02:00
|
|
|
git-get-pub:
|
2026-06-07 07:52:18 +02:00
|
|
|
set -e; if git remote | grep -q "^pub$$"; then \
|
|
|
|
|
git fetch --prune --recurse-submodules=on-demand pub master ;\
|
|
|
|
|
git submodule foreach --recursive 'git fetch --tags -f pub' ;\
|
|
|
|
|
git rebase --autostash pub/master ;\
|
|
|
|
|
git merge --ff-only pub/master ;\
|
|
|
|
|
git submodule update --init --recursive ;\
|
2026-05-14 12:37:34 +02:00
|
|
|
fi
|
|
|
|
|
|
2026-05-28 07:14:26 +02:00
|
|
|
git-get-%: FORCE
|
2026-02-21 12:08:47 +01:00
|
|
|
PGIT_SH_PROJECTS=. $(PGIT_SH) get --refspec $*:$(GIT_MAIN_BRANCH):current-branch
|
2025-11-24 11:22:56 +01:00
|
|
|
|
2026-02-26 14:00:22 +01:00
|
|
|
get-%: git-get-%
|
|
|
|
|
@:
|
|
|
|
|
|
2020-11-11 16:16:42 +00:00
|
|
|
pkg-manager-refresh:
|
2026-01-28 08:10:09 +01:00
|
|
|
$(PKG_MANAGER) refresh
|
2020-11-11 16:16:42 +00:00
|
|
|
|
|
|
|
|
pkg-install-build-deps:
|
2026-03-15 13:20:14 +01:00
|
|
|
$(PKG_MANAGER) install $(shell $(proj_query_cmd) required-os-pkg --quote --skip-excluded "build" $(PROJECT))
|
2020-11-11 16:16:42 +00:00
|
|
|
|
|
|
|
|
pkg-install-release-deps:
|
2026-03-15 13:20:14 +01:00
|
|
|
$(PKG_MANAGER) install $(shell $(proj_query_cmd) required-os-pkg --quote --skip-excluded "build,run,release" $(PROJECT))
|
2020-11-11 16:16:42 +00:00
|
|
|
|
2026-03-15 16:39:28 +01:00
|
|
|
pkg-install-testbuild-deps:
|
|
|
|
|
$(PKG_MANAGER) install $(shell $(proj_query_cmd) pkg-requires --quote --skip-excluded --hide-self --syntax names-only --delimiter " " "build,run,devel,release" $(PROJECT))
|
2026-01-20 11:36:25 +01:00
|
|
|
|
2019-07-06 14:39:33 +00:00
|
|
|
recache-vars:
|
make/[Makefile|*.mk): Improve variable caching
This commit aims at improving speed by using better caching.
- Makefile, cache.mk: Split .cache.mk up
To allow caching of runtime path variables which are
project-specific, split .cache.mk up in .cache-project.mk and
.cache-projects.mk
- ldlibpath.mk: Cache ldlibpath, exepath and pythonpath
Place the output of $(call proj_query ldlibpath), $(call
proj_query, exepath) and $(call proj_query pythonpath) in
JW_PKG_LD_LIBRARY_PATH, JW_PKG_EXE_PATH, and JW_PKG_PYTHON_PATH
respectively, and cache the variables in make/.project-cache.mk.
- cache.mk: Use = instead of :=
Recursively expanded variables are nearly as fast as := variables
if the assigned value is a fixed string. And sometimes it's not,
rightly so, because variables get assigned below, as with
JW_PKG_XXX for instance.
- cache.mk: Use $(TOPDIR) as variable values
Replace absolute references to project's topdir by $(TOPDIR) with
sed. As soon as the project queries produce absolute paths, they
will be transformed into relative paths which allow the code base
to be moved to a different location and still remain functional
without a rebuild.
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-22 14:12:58 +01:00
|
|
|
rm -f $(TOPDIR)/make clean-cache cache
|
2026-04-13 12:13:01 +02:00
|
|
|
|
|
|
|
|
canonicalize-remotes:
|
|
|
|
|
$(PYTHON) $(JWB_SCRIPT_DIR)/jw-pkg.py projects canonicalize-remotes
|
2026-05-26 10:34:17 +02:00
|
|
|
|
|
|
|
|
Makefile: ;
|
|
|
|
|
|
|
|
|
|
%: $(TD_COPY_SRC)/% $$(foreach path,$$(TD_COPY_SRC_PATH),$$(wildcard $$(addprefix $$(path)/,$$@))) $$(wildcard $$@.*)
|
|
|
|
|
cat $^ > $@.tmp
|
|
|
|
|
mv $@.tmp $@
|