Commit graph

111 commits

Author SHA1 Message Date
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
14c451854b projects.mk, topdir.mk: Minor code beautification
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-27 17:03:53 +00:00
823840d823 topdir.mk: Add target echo-hash to topdir.mk
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-16 18:45:24 +00:00
e827efadd5 make, scripts: Replace list-vcs-files.sh by scm.sh ls-files
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-16 10:30:49 +00:00
9b532fd601 make, scripts: Rename list-cvs-files.sh to list-vcs-files.sh
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-13 18:15:12 +00:00
567dc2295a git-submod.mk, topdir.mk: Replace git.jannet.de by git.janware.com
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-11-11 15:07:39 +00:00
853d401d62 topdir.mk: Add target git-ssh-%
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-10-18 18:30:17 +00:00
1d0d09d11c topdir.mk: Add target git-ssh
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-10-18 18:26:02 +00:00
cd2efda598 topdir.mk: Replace jw-build's build.py by projects.py
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-03-07 11:26:10 +00:00
5b8c7fe738 topdir.mk: Fix wrong command in echo-prereq-build
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-03-06 16:36:05 +00:00
5b737e50f8 defs.mk, dirs.mk, topdir.mk: Beautify cat-makefiles target output
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-03-04 10:01:10 +00:00
098a5f2a80 topdir.mk, pkg-manager.sh: Add archlinux package dependencies
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-01-02 14:10:48 +00:00
e68d4eb83b make, scripts: Now excplicitly calling python2 executable instead of python
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-01-02 13:12:00 +00:00
f70465cbd5 make: Replace pwd by $(PWD)
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-12-18 13:45:55 +00:00
f5c43f706a make: Replace some executables by absolute paths to improve performance
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-09-02 19:26:52 +00:00
b35a50944c project.conf, topdir.mk, projects.py: Replace pkg.required.xxx by pkg.requires.xxx
This opens up a more concise handling of pkg.conflicts.xxx in the future, and
prepares some code simplification in projects.py.

Signed-off-by: Jan Lindemann <jan@janware.com>
2017-06-26 09:33:53 +00:00
6be9da9d37 topdir.mk: Fix broken description creation
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-06-25 16:26:46 +00:00