Remove unused code, and code which actually does something: CACHED_VARS looks as if it's sufficently and more centrally defined in make.mk, don't override that.
Add std-targets.mk, meant to be included mostly to make sure all mandatory targets are there. On clean and distclean, it also removes stuff that should not be there anymore after clean.
Change $(check_scm_sync) from "make git pull" to "make git-pull-maintainer", which most notably should delegate devops builds to the maintainer defined in project.conf.
There's little system in the pkg-install-xxx targets, add one more to increase the confusion. It's needed to install all packages needed to do a standalone build against the packages installed into the system via package manager. That said, the respective jw-projects.sh commands need broader refactoring, as well as the pkg-install-xxx target naming.
Make jw-projects.py list-repos support a local directory as base URL of all git repositories, notably used by PROJECTS_DIR_REMOTE_BASE, which can now point to a local directory.
Targets defined by projects-dir.mk are not available before it is included, but make makes up its mind about what targets are available after parsing the included makefiles, so remove that redundancy.
On the other hand, a dependency alone is not enough for make to understand that an included makefile has been remade, it needs a rule, so add a dummy-rule body. In this case only echoing that the include file has been provided.
Kali Linux' default installation doesn't have /usr/bin/time which brings out a but: $(TIME) doesn't expand to nothing but to -p, which fails miserably, of course. Fix that.
PGIT_SH gets added --remote-base, but too late to make it into the non-recursive variable PGIT_SH_CLONE. This leads to --remote-base lacking from the clone invocation, and anonymous Git over HTTP failing because it tries to clone via SSH. Fix that.
make git-show-pushable-master-branches output too litte for two reasons: 1. grep -q returns zero also if no matches are found, and 2. PROJECTS doesn't contain all relevant projects. BUILD_PROJECTS is more meaningful.
For a project to supply templates, it needs to advertise their location. For this, the tmpl_dir make variable is added to projects.mk. If other-project wants to get hold of some-project's templates, it can do, e.g.:
Templates (i.e. text files ending as .tmpl) are not part of jw-pkg anylonger, but controlling the way they are installed is beneficial to other packages, so add tmpl.mk back.
That said, the variable names will need some tweaking to avoid collisions. Postponed.
To avoid name collisions, rename svg.mk to the more specialized svg-to-pixmap.mk, because that's what it does. To the same end, rename $(SVG) to $(PIXMAP_TO_SVG_SRC_SVG).
--create-remote-user-repos had been disabled in 4053451bfd on the grounds that it's hard to test and possibly superflous. It actually is not superfluous, as devops builds show, and that's a valid test-case, so re-enable it.
Running "make install" from an arbitrary source directory currently by default either installs to a user-accessible ENV_PREFIX, or, if DEVELOPMENT is set to false, tries to install into the system's root filesystem, but fails over permission errors. This was by design: To now, I considered trying the latter ill-conceived, because installing without package manager control bears the risk of leaving unversioned files in the system.
Actually, thinking again, during development this looks like a valid use case: Having run pkg-rebuild-reinstall before, installing from a source directory will leave a trace in the package manager's hash check output, will be handled during the next clean install, and might be a useful shortcut for trying things in the root file system.
JS_MINIFY_FILTER_IN can be defined to nothing, in which case minifying breaks, so don't minify if there's no filter. As an additional benifit, defining it to the empty string in local.mk allows to use Vim's quickfix window for syntax errors, because there's no intermediate file created.
tailwind.mk is meant to generate a CSS file with tailwind classes from configuration files named *.css.tw or *.css.tw.tmpl. The latter flavour understands some make-style variables, as of now only $(TOPDIR).
Define DATA_DIR, the directory where read-only, non-executable and non-configurable resources should be stored. And define JSON_DIR as $(DATA_DIR)/json.
PACKAGE_VCS_FILES defaults to false. Defining it to true before including rpmdist.mk includes the version-control metadata files in the source packages.
jw-build doesn't stop at building software, packaging it afterwards is also a core feature, so this commit gives the package a better name.
The commit replaces strings s/jw-build/jw-pkg/ in text files and file names. Fallout to the functionality is fixed, variable names are left as they are, though. To be adjusted by later commits.
git-pull-% pulls whatever $(GIT_MAIN_BRANCH) happens to be from the remote jw-% into the current branch, with --rebase and --autostash.
git-pull-maintainer does the same with <maintainer>. <maintainer> is figured out from the configuration in projects.conf. If it's the invoking user, origin is used.
In the attempt to move away from communicating options via environment variables from one part of jw-build software to another, replace PGIT_CLONE_FROM_USER with the clearer --refspec option. Which is also more versatile.
Don't unconditionally add proactiveAuth=basic to Git's config during clone, but only if cloning happens after authentication.
This saves unauthenticated users funny password prompts. On the other hand, this makes a server setting persistent which could be changed on the server.
URL =~ /api/ (or so) => 401, followed by Basic Auth URL !=~ /api/ (or so) => Redirect or free access, depending on resource
Currently all resources, including API, are accessible by either basic auth or a Cookie, but basic auth needs to be present in the first request, which throws off some clients (notably Git without proactiveAuth=basic).
Currently, the primary discriminating criterion on how to handle a set of remote repositories is whether or not JANWARE_USER is defined. The canonical way to do that is PROJECTS_DIR_REMOTE_BASE, though, so go from that definition.
PROJECTS_DIR_REMOTE_USER_SUBPATH is a janware.com specialty somewhat. Having subpaths is a Forgejo feature request on Codeberg, though, so it might also be here to stay.
Pass -c http.proactiveAuth=basic to the initial "git clone jw-build" invocation. This is necessary while jw-build is still behind authentication. The restriction will likely be lifted (for jw-build), but for testing now it's fine, and it doesn't do any harm, either. With the way janware.com currently operates, it will also necessary for push over HTTP, so make it persistent in jw-build's configuration.
Linking the projects-dir Makefile fails if make pkg-rebuild has been run on jw-build, because it leaves another projects-dir-minimal.mk below the dist directory. Fix that.
The usage comments heading projects-dir-minimal.mk and projects-dir.mk state that for cloning all repositories, JANWARE_USER needs to be defined. That restriction is now gone, so reflect that in the comment.
Add the variable PROJECTS_DIR_REMOTE_BASE, defaulting to ssh://git.janware.com/srv/git if REMOTE_USER is defined, and to https://janware.com/code in case it isn't.