Commit graph

2,097 commits

Author SHA1 Message Date
fc02dad92c projects-dir-minimal.mk: Default PROJECTS_DIR_REMOTE_BASE to jw-build's remote
If jw-build is already cloned, infect all other repositories with its
remote via PROJECTS_DIR_REMOTE_BASE.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 16:54:04 +01:00
561905bab7 projects-dir.mk: Fix empty JANWARE_USER error
JW_BUILD_SSH_EXTRA_OPTS contains a -l $(JANWARE_USER), which make ssh
break if $(JANWARE_USER) is empty. Fix that case.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 16:33:18 +01:00
99dca58e1d projects-dir.mk: Make GIT_ASKPASS absolute
The GIT_ASKPASS environment variable can point to a relative path,
and since pgit.sh currently does a chdir, it needs to be made an
absolute path.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 15:28:05 +01:00
7d436f1c76 projects-dir[-minimal].mk: Go from PROJECTS_DIR_REMOTE_BASE
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.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 13:52:41 +01:00
f9fe1dbe51 projects-dir-minimal.mk: Add PROJECTS_DIR_REMOTE_USER_SUBPATH = /proj
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.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 12:40:41 +01:00
41cc712dee projects-dir-minimal.mk: Clone jw-build with proactiveAuth=basic
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.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 09:38:24 +01:00
4c35ceb27a projects-dir-minimal.mk: Support JW_BUILD_BRANCH
Pass --branch $(JW_BUILD_BRANCH) to git clone invocations during the
initial cloning of jw-build. Used for testing.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-20 09:46:47 +01:00
6d7d18d9bd projects-dir-minimal.mk: Fix get-user-info infocation
jw-python is invoked with -t (topdir) instead of -p (prefix) for
JANWARE_USER detection, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-19 09:16:24 +01:00
e1a4746ad5 projects-dir-minimal.mk: Use get-auth-info for JANWARE_USER
Default JANWARE_USER to the user retrieved by jw-projects.py get-auth-info.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-19 08:37:07 +01:00
8de4a90796 projects-dir-minimal.mk: Fix linking after package build
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.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-19 08:24:58 +01:00
d740f30226 projects-dir[-minimal.mk]: Group PGIT_SH-related variables
Group variables related with pgit.sh (PGIT_SH and PGIT_SH_CLONE)
closer together. Define CLONE_FROM_USER early on.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 21:14:19 +01:00
aac261d782 projects-dir[-minimal].mk: Change usage comment
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.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 15:56:21 +01:00
69132d9246 projects-dir[-minimal].mk: Support PROJECTS_DIR_REMOTE_BASE
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.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 15:55:20 +01:00
7d1ff5c6e6 projects-dir.mk: Default PGIT_CLONE_FROM_USER to janware
Clone from user janware if JANWARE_USER is not defined.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 15:56:02 +01:00
fe81bd209e projects-dir[-minimal].mk: Don't default JANWARE_USER
Do not set JANWARE_USER to $(id -un) in case it's undefined. Instead,
rely on it being set explicitly in the environment if so desired.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 15:44:57 +01:00
370c7e499e projects-dir.mk: Conditionally pass --create-remote-user-repos
Pass --create-remote-user-repos to pgit.sh clone in case JANWARE_USER
is defined, restoring the original behaviour.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 16:39:52 +01:00
b7d88a6e22 py-defs.mk: Default PY_UPDATE_INIT_PY ?= true
Set PY_UPDATE_INIT_PY to true to match jw-build's default behaviour
before the variable was introduced.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-18 12:04:29 +01:00
0c9fd98009 projects-dir.mk, scripts/Makefile, jw-pkg: Move jw-pkg from jw-build to jw-base
jw-pkg is related to, but strictly speaking not indispensible for building and
packaging software. So, in the attempt have a minimal jw-build, move jw-pkg to
jw-base, and fix all packages that use it.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 13:05:43 +01:00
36092d6b1b projects-dir.mk: Make list-files ignore errors
Make list-files target ignore errors. This catches errors from
git ls-files | xargs realpath if git ls-files lists dead symbolic
links, as in my-project/blah/dev/fd -> ./proc/self/fd.

Implemented by passing -q (quiet) to realpath, not sure what else
this suppresses.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 12:34:14 +01:00
9018eb7c30 projects-dir-minimal.mk: Run make after cloning jw-build
After initially cloning jw-build and including
projects-dir-minimal.mk, new targets are not considered, so run make
again.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:53:28 +01:00
b82d4249f9 pgit.sh: Remove CVS support
Don't identify projects directory by a the presence of a correct CVS
subdirectory any longer.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 11:30:59 +01:00
67fb954f3e projects-dir.mk: Remove CVS support
Now that CVS is finally retired for building multiple projects from
VCS, remove support.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-17 10:22:35 +01:00
d0c1eac1a9 py-defs.mk, py-mod.mk: Support PY_UPDATE_INIT_PY
Allow to disable auto-updating of __init__.py in a directory via
PY_UPDATE_INIT_PY = true | false.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-16 18:42:58 +01:00
31537a0bd6 build.cmds.CmdCreatePkgConfig: Add module
Implement the functionality of create-pkg-config.sh in a Python
module CmdCreatePkgConfig.py. This allows to remove
create-pkg-config.sh and jw-build-functions.sh.

Note that the translation was done pretty literally to play it safe.
More code can and should be removed by taking advantage of the fact
that jw-projects.py knows more about the project than the shell
scripts.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-16 17:31:16 +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
aa3e2efd84 projects.py: Move bulk of code into module
Move nearly all of projects.py into src/python/jw/build/App.py. The
plan is to split the script into parts and import them.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-15 11:08:52 +01:00
166dbc06bb vim.mk: Re-add files necessary for building jw-ws
vim.mk is necessary for building jw-ws, add it.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 17:18:31 +01:00
d7d4ffa640 py-run.mk, python-tools.sh: Re-add files necessary for jw-client-devops-web
jw-client-devops-web needs py-run.mk and python-tools.sh, add them.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 17:15:24 +01:00
1a0eb42191 projects-dir-minimal.mk: Link Makefile more agressively
The link to the projects dir toplevel Makefile is not created if a
jw-build directory already exists for some reason, fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 17:13:29 +01:00
9ddbc547c2 gettext.mk: Re-add files necessary for building bootstrap
Re-add all files missing for building the bootstrap package.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 16:22:40 +01:00
6bd584ad70 cpp.mk, swig.mk: Re-add files necessary for building auth
Re-add all files missing for building the auth package.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 16:17:21 +01:00
b0c72c92f9 dummy.mk: Re-add files necessary for building jw-apache
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 16:15:12 +01:00
4f20f03db7 make: Re-add files necessary for building closure-compiler
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 16:13:17 +01:00
bf16c6714b make, scripts: Re-add files necessary for building ytools
Re-add everthing needed for building and packaging ytools. This is a
big commit, 2002 lines of code. It mostly consists of C/C++ machinery,
plus some documentation-related stuff.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 15:59:49 +01:00
0a9340af49 make: Re-add files necessary for building jw-python
Re-add everything necessary for building and packaging jw-python.

ldlibpath.mk is not strictly necessary, but might be with other
Python packages backed by compiled C-code, so leave it in.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-13 17:27:14 +01:00
df9a4e6a40 projects-dir-*.mk: Re-add files necessary for building projects directory
Re-add everything necessary for recursively building all repos in
a directory, e.g. as a build controlled by janware.com/Makefile or
any other installation.

This adds 489 lines of code which can (and should) be massively
reduced, notably removing code supporting CVS.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-13 16:23:35 +01:00
82eb80979d bin, make, scripts: Re-add files necessary for packaging jw-build
Re-add all files necessary to package jw-build itself, i.e.
sucessfully run make pkg-rebuild-reinstall. This adds 1892 lines of
code.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 11:22:50 +01:00
bc883deed4 Everywhere: Remove everything non-essential for "make clean all"
This commit removes everything not strictly necessary for running
"make clean all" inside jw-build.

packaging jw-devtest. This cuts the repo down from 24077 to 4725
lines of code.

The idea is to

1) Further remove bloat from the remaining bits

2) Re-add what's necessary to build and package other essential repos.

   The decision should be based on whether or not jw-build can also be
   useful in a non-janware context.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-14 15:02:56 +01:00
cb714d83ad py-devs.mk: Don't ?= PYTHONPATH
For performance's sake, don't ?= define PYTHONPATH, but := it, like
so:

  ifeq ($(origin PYTHONPATH),undefined)
    PYTHONPATH := $(call proj_query, pythonpath $(PROJECT) $(PY_PREREQ_RUN))
  endif

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-13 15:20:54 +01:00
cea804eac4 projects-dir.mk: Remove Makefile from CVS/Entries
The projects toplevel Makefile is not maintained in CVS anylonger but
in Git, so don't update it from CVS any longer.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-11 16:58:22 +01:00
c9ddeef8b4 projects-dir-minimal.mk: Don't clone jw-dev branch
Use the default branch to clone projects-dir-minimal.mk during
initialiazation of the build tree.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-07 12:27:16 +01:00
9147a78f2e projects-dir.mk: Don't hardcode Makefile name
"Makefile" is used in dependency checks within projects-dir.mk. Since
it might be included from projects-dir-minimal.mk, which also works
with "GNUmakefile", make this fallback of a predefinable variable,
PROJECTS_MAKEFILE_NAME.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-06 16:51:10 +01:00
51c1a1508d projects-dir.mk: Support JWBDIR_NAME and JWBDIR_SEARCH_PATH
Adapt projects makefile to match the mechanism all proj.mk's are
supposed to find their JWBDIR. Namely make JWBDIR_NAME a
conditionally assigned variable to allow for some testing of
alternative jw-build trees.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-05 12:49:29 +01:00
df4a295d79 Add git-projects-dir-[include|minimal].mk
In the attempt to move both jw-build and the janware toplevel
Makefile from CVS to Git, add two new makefile snippets to make/*.mk:

  - projects-dir-minimal.mk

    A new toplevel-Makefile for building all projects in one go. It
    should be suitable to be downloaded from janware.com/Makefile and
    then be used to bootstrap all repos hosted on janware.com, that a
    user has access to, just like the current toplevel Makefile is.

    It is as small as possible: Little code means few assumptions on
    what the world outside of it looks like, notably jw-build. This
    is desirable, because it lives outside of version control, albeit
    for a short while, and as long as it does, there's no mechanism
    in place to keep it current.

    That said, on first use, it replaces itself with a symbolic link
    into jw-build and is then version controlled with jw-build.

  - projects-dir-include.mk

    This is essentially the existing projects-dir.mk /
    toplevel-Makefile, which it includes. It's meant as a place for
    adaptations to the next-generation implementation. This might
    prove handy to have while both implementations coexist during the
    transition phase.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-03 22:28:08 +01:00
ec856711d2 conf.mk: Fix: Packages own /usr/lib/tmpfiles.d
/usr/lib/tmpfiles.d is provided by the OS, don't include it in the package.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-06 07:24:32 +00:00
64bc96624e htdocs.mk: Support HTML_STOPDIR_NAME
htdocs.mk's install relies on source code having its HTML contents installed in
a subdir called "htdocs". Make that choice a variable named
"HTML_STOPDIR_NAME".

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-09-21 11:43:45 +00:00
336d1a5133 make: Add definitions and rules for *.tmpfiles
Add support for *.tmpfiles. xxx.tmpfiles gets installed by conf.mk as
/usr/lib/tmpfiles.d/xxx.conf.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-09-14 13:29:04 +00:00
a907a5640f py-defs.mk: Support PY_INSTALL[_XXX]
Support the Makefile variables PY_INSTALL, PY_INSTALL_REG, PY_INSTALL_PYC, all
defaulting to true. They can be set to false to stop installation of whatever
file type is undesired in the target. A common use case for this are
__init__.cpython-313.pyc, provided by a package the installing package depends
on. The prerequisite package might already provide these files for common
directories.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-07-16 16:21:35 +00:00
3d4ecbc508 gettext.mk: Remove $(GETTEXT_PROJECT_POT): $(GETTEXT_INPUT_FILES) dependency
$(GETTEXT_PROJECT_POT) is always generated if $(GETTEXT_INPUT_FILES) are newer
than it. Having this happen automatically is not useful, since it can break
manually edited and version controlled $(GETTEXT_PROJECT_POT).

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-06-04 02:23:24 +00:00
3aff3b4559 defs.mk: Add target echo-targets
echo-targets prints a list of targets provided by the invoked Makefile.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-05-30 07:19:55 +00:00