Commit graph

127 commits

Author SHA1 Message Date
f6f6e56943
make / scripts: git.janware.com -> devgit.janware.com

janware upstream development server moved from git.janware.com to devgit.janware.com. This commit follows the move with pretty much a simple

s/git.janware.com/devgit.janware.com/

over jw-pkg. It found 14 matches, that's pretty bad.

FIXME: Reduce the redundancy, or, better, replace the devgit.janware.com goodies by a more generally useful concept altogether.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-05-12 15:15:29 +02:00
5830984bfc
cmds.distro.CmdXxx: Rename to cmds.pkg.CmdXxx

With the exception of the "info" subcommand, nearly all of distro's subcommands deal with package managing, so push them into their own command category.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-04-24 16:53:55 +02:00
281cdf4ec7 cmds.projects.CmdCanonicalizeRemotes: Add command

CmdCanonicalizeRemotes / canonicalize-remotes and the respective target in topdir.mk remove the /srv/git portion from all remotes' URLs pointing to git.janware.com.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-04-13 12:23:02 +02:00
d8653ac486 Remove /srv/git from janware Git URLs

git.janware.com has /srv/git removed from its Git URLs, follow suit.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-04-13 12:15:37 +02:00
c893584e5e make: Replace RPM -> PKG

jw-pkg supports more than RPM-based package managers, but for historic reasons, lots of its Makefile variables still have "RPM" in their names. This is misleading. Replace "RPM" in variable names by the more generic "PKG" where appropriate.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-16 14:57:50 +01:00
02c4f9080b topdir.mk: Add target get-official

make get-official already works as a pattern rule, but this commit adds it explicitly to make tab-completion work.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-16 06:05:01 +01:00
adb7fce0ab topdir.mk: pkg-install-release-deps: Improve selector

Use pkg-requires --hide-self to find all prerequisites that should be installed for a test run against packages installed from the repositories, including self-built and self-hosted packages.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 19:34:50 +01:00
5b3118319c cmds.projects.CmdRequiredOsPkg|BaseCmdPkgRelations: Align APIs

In a push to eventually merge the classes, somewhat align the command-line API of CmdRequiredOsPkg to the one of BaseCmdPkgRelations by using dependency flavours as mandatory, first argument.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 18:33:51 +01:00
57f204ccaa cmds.projects.BaseCmdPkgRelations: Remove --no-version

Merge --no-version into the --syntax option as "--syntax names-only" to remove redundancy.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 16:41:59 +01:00
84f1ad66f6 topdir.mk / projects-dir.mk: Remove BASE_PKGS

Move the dependencies listed in BASE_PKGS from projcts-dir.mk and topdir.mk into project.conf.

Due to various hen-and-egg problems on a minimal system, in some situations these packages can't be installed from project.conf. The same is true with BASE_PKGS, however, so remove it, at least that does away with some redundancy.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-15 14:58:54 +01:00
c159a11bbe topdir.mk: pkg-install-[testbuild|relase]-deps: Unify

Make pkg-install-testbuild-deps an alias for pkg-install-release-deps. At this point, they do nearly the same thing, and the distinction between what the implementations should do are blurry at best. This commit removes redundancy but keeps the use cases distinct. Different implementations can be reinstantiated should requirements for different implementations become clearer later on.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-14 14:30:28 +01:00
3e897f4df8 lib.Distro, ExecContext: Add classes, refactor lib.distro

The code below lib.distro, as left behind by the previous commit, is geared towards being directly used as a command-line API. This commit introduces the abstract base class Distro, a proxy for distribution-specific interactions. The proxy abstracts distro specifics into an API with proper method prototypes, not argparse.Namespace contents, and can thus be more easily driven by arbitrary code.

The Distro class is initialized with a member variable of type ExecContext, another new class introduced by this commit. It is designed to abstract the communication channel to the distribution instance. Currently only one specialization exists, Local, which interacts with the distribution and root file system it is running in, but is planned to be subclassed to support interaction via SSH, serial, chroot, or chains thereof.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-06 14:56:46 +01:00
9449840401 projects-dir.mk, topdir.mk: Alias get-% for git-get-%

Add a VCS-independent rule rule get-%, currently an alias for git-get-%, with an empty recipe to keep GNU Make satisfied.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-26 15:18:09 +01:00
9aba15cd88 topdir.mk: git-get-% -> current-branch

Currently git-get-% pulls into the master branch. Change that to pull into the branch currently checked out in the workspace, because that's the more likely use case if you want a quick update from somewhere.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-21 15:54:53 +01:00
5a3299b1c6 projects-dir.mk: Add [git-]get-maintainer

Add targets to update all repositories from their respective maintainers.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-21 15:53:27 +01:00
f86634a1d1 pgit.sh: Rename command "clone" to "get"

"clone" in the Git sense means to copy a remote project over from scratch. pgit.sh clone has come from that, but has since evolved into something different, a mixture of clone, pull and fetch, so find a different name. "get" seems generic enough and doesn't clash with a Git meaning. Adapt variable names accordingly across the project.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-21 15:53:25 +01:00
ada7e7572f topdir.mk: git-pull-%: Always use pgit.sh

git-pull-<username> doesn't use pgit.sh if username == login. pgit.sh should handle that case fine now, so remove the distinction from topdir.mk and make it in one place, i.e. pgit.sh. This has the additional advantage that pull as done by pgit.sh conveniently uses --autostash.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-19 19:38:16 +01:00
fc80bde804 topdir.mk: git-init et al: Change commit message

Change commit message of first commit from "initial checkin" to "First commit", because that's more to the point.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-18 19:21:14 +01:00
5e040f652e topdir.mk: Use pgit.sh for git-pull-%

Use pgit.sh to for the git-pull-% target. This should make git-pull-maintainer work. To limit the blast radius for now, only use it if the source user differs from the invoking user.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-18 01:20:26 +01:00
2bbf5bd8e7 jw.pkg.cmds.projects.CmdRequiredOsPkg: Support --quote

--quote puts double quotation marks around the listed dependencies, protecting version requirements (>= 1.0) and parenthesis "perl(GD)" from the shell.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-29 11:28:17 +01:00
b8e8ecf2f1 pkg-manager.sh: Replace by jw-pkg.py distro

Retire pkg-manager.sh and replace it by the cleaner "jw-pkg.sh distro" command, essentially providing the same functionality and nearly the same command-line interface.

Not-so-fun-fact:

jw-pkg > git diff --stat jw-devops/master ... 71 files changed, 732 insertions(+), 340 deletions(-)

400 LOC more. That's what the move from a shell script to the more maintainable Python versions costs. Still a good idea, and the enhanced extensibility might pay off in terms of LOC with other shell scripts in the future.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-28 18:11:09 +01:00
132dce8b3f jw-projects.py: Rename it to jw-pkg.py

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>
2026-01-28 15:24:16 +01:00
0b83c863a2 jw.build.cmds: Move build.cmds -> cmds.projects

Reorganize the Python module structure. Placing the command classes under jw.cmds.projects instead of jw.build.cmds will allow to add a nested command structure, with the current commands, being mostly related to building software, found below a "projects" toplevel command.

Other conceivable commands could be "package" for packaging, or "distro" for commands wrapping the distribution's package manager.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-26 17:58:23 +01:00
f869b5aaca defs.mk: Define Q and use it in *.mk

Define Q ?= @, and replace @<command> in recipes by $(Q)<command>. Meant to be overridden from the environment for debugging as in

Q= make

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-26 17:58:23 +01:00
f05e1ee0e3 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-26 17:17:23 +01:00
4b4b43193c topdir.mk: Add pkg-install-testbuild-deps

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.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-20 14:56:08 +01:00
9217d38964 Everywhere: Rename package "jw-build" to "jw-pkg"

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.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-28 13:35:56 +01:00
7152a811e9 topdir.mk: Add target git-pull-official

git-pull-official is currently an alias to git-pull-devops.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-24 11:34:03 +01:00
bf86f6c625 topdir.mk: Add targets git-pull-% and git-pull-maintainer

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.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-24 11:22:56 +01:00
fbc9e3a001 make, scripts: Rename projects.py -> jw-projects.py

projects.py is too unspecific, rename it to jw-projects.py.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-15 12:06:38 +01:00
2187d1b089 topdir.mk: Fix missing JANWARE_USER for git.janware.com login
Signed-off-by: Jan Lindemann <jan@janware.com>
2024-01-12 14:36:38 +00:00
b35b87009b topdir.mk: Add pkg-manager targets

Add targets also present in projects-dir.mk:

- Pkg-manager-refresh - Pkg-manager-install-build-deps - Pkg-manager-install-release-deps

Signed-off-by: Jan Lindemann <jan@janware.com>
2020-11-11 16:16:42 +00:00
6bdb16878a make: Replace "pereq" in targets by "deps"

"prereq" is simply impossible to use in explanations with a straight face.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-12-07 19:21:08 +00:00
31d11febd8 python-cli.mk, topdir.mk: Python2 -> $(PYTHON)
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-07-06 14:39:33 +00:00
07abf3f93e topdir.mk + dirs.mk fix: $(PREREQ_DIRS_DONE) was not checked

dirs-all.done doesn\'t check $(PREREQ_DIRS_DONE), this commit fixes that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-07-01 17:37:10 +00:00
bdd66dbc26 Everywhere: Rename MOD_SCRIPT_DIR -> JWB_SCRIPT_DIR

Follow name change of MODDIR -> JWBDIR.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-29 21:45:24 +00:00
b2d6e6f554 Everywhere: Rename MODDIR -> JWBDIR

Rename the omnipresent MODDIR variable to JWBDIR, since that's more to the point.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-29 21:34:18 +00:00
3985c929ae topdir.mk: Ignore SUBDIRS without Makefile
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-29 19:09:08 +00:00
9b41d4eefc dev-utils.mk, list-files.mk, topdir.mk: Extract from dev-utils.mk and topdir.mk
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-13 11:11:20 +00:00
7abbf1d044 projects.py: Rename command requires-pkg to required-os-pkg

Rename command requires-pkg to required-os-pkg to avoid confusion with pkg-reqires. The command could be merged into pkg-requires at a later time.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-11 10:46:23 +00:00
4a1c5b94df topdir.mk: Make git-init-remote more robust (at least in theory)
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-13 15:45:01 +00:00
4d9d10540b topdir.mk: Use $(PROJECT) instead of $(RPM_PROJECT) for git

Identify the remote's name by $(PROJECT) instead of $(RPM_PROJECT) now. Don't know the exact rationale for $(RPM_PROJECT), but in case of arm-none-eabi-mcu-blink it was certainly wrong.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-13 12:37:25 +00:00
92d3d9c36d topdir.mk: Remove target list-files et al

These are now in dev-utils.mk (which isn't included from topdir.mk)

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-12 11:52:39 +00:00
685d642b9e topdir.mk: Topdir.mk add subdir exe as an alias for utils
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-06 12:48:28 +00:00
aa85417a17 Everywhere: Purge spaces in text files
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-06 12:38:20 +00:00
0eaef0c326 conf/jcs, make, tmpl/doxygen: Align equal signs in makefiles to column 30
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 18:12:28 +00:00
f40356cf59 make/*.mk: More performance tweaks
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-28 16:12:58 +00:00
9fd2f3f9ec topdir.mk: Remove *dist* with topdir.distclean
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-30 16:23:20 +00:00
6a4092b8af topdir.mk: Don't set default SUBDIRS if ORDERED_SUBDIRS is set

If ORDERED_SUBDIRS is set, SUBDIRS should by default start with $(ORDERED_SUBDIRS), and filled up with what $(FIND_SUBDIRS) turns up.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-30 16:23:07 +00:00
c17d563991 topdir.mk: Run make git-update-project-description after initializing git repo
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-03 11:33:31 +00:00