Commit graph jw-pkg/make/defs.mk
Author SHA1 Message Date
c20bc72efb
defs.mk: Add quadlet unit types to LOCAL_SYSTEMD
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m28s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m20s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m49s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m1s
CI / Packaging test (push) Successful in 0s
LOCAL_SYSTEMD in defs.mk only collects the classic unit types, not
quadlet types - .container, .pod, .network, .volume, .image, .kube.
They're all systemd units that are installed under the system's systemd
directory and read by the podman-systemd-generator at boot.

Add all six quadlet extensions to the wildcard.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-25 18:44:30 +02:00
2b67d43279
defs.mk: Add *.md to the DOC file types
Add  *.md to DOC, the list of file extensions recognized and packaged by
default.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-19 20:51:11 +02:00
214e4b995e
defs.mk: Don't use plain /usr/bin/install
In a development tree, $(INSTALL) falls back to plain install(1), which
refuses dead symlinks, so unprivileged "make install" fails outright.
Packaging is unaffected, because the spec exports INSTALL_LOG, which
already routes $(INSTALL) through "pkg.sh log-install"

Route the remaining $(INSTALL) defaults through $(LOG_INSTALL_SH) as
well to address the failures: $(SUDO) jw.pkg log-install -p for
DEVELOPMENT=false, plain jw.pkg log-install otherwise. Move -f $(PKG_FORMAT)
out of $(LOG_INSTALL_SH) and into the two logging call sites, so the
no-log paths don't carry a package format they never use.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-18 17:27:32 +02:00
7f841e991e
defs.mk: Default VERSION -> 0.1.0-0-dev
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m8s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m12s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m35s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m23s
CI / Packaging test (push) Successful in 0s
Don't start a fresh project with version 1.0.0-0-dev. By default no
project can honestly claim the level of maturity suggested by 1.0.0-0
with its first commit.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-15 20:44:30 +02:00
f70b14e92b
defs.mk: Disable BUILD_PKG_CONFIG
BUILD_PKG_CONFIG installs files across project directories into
$(JWBDIR) because of this:

   BUILD_PKG_CONFIGDIR      = $(JWBDIR)/pkgconfig

The concept is currently not used by any downstream project anymore,
hence it lacks sufficient testing at this point. Moreover, it breaks
building repos which are sandboxed to their own root directory,
because it tries to install the generated .pc file back into
$(JWBDIR). The concept itself isn't entirely off, so leave the code
in, disabled, with a comment.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-08-11 16:45:14 +02:00
b7431e5bc6
rules.mk / defs.mk: Disable BUILD_MAKEDIR
BUILD_MAKEDIR is a variable which exists for consistency's sake. On
the other hand, nor jw-pkg nor any downstream package ever copies
makefile snippets during build time. The rule introduced by
BUILD_MAKEDIR is quite costly in terms of performance and makes
caching harder to understand. This commit disables the variable.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-07-24 13:34:08 +02:00
1062be24db
App: Remove hardcoded local/src from App and defs.mk
local/src is a janware-specific path, remove it from App and defs.mk.
It's still in pkg.sh as a safety measure. Will have to go, too, but
is kept in for now until further audit.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-07-24 13:20:18 +02:00
3aecb6c685
rules.mk: Add targets to check shell syntax
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m3s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 3m33s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m9s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m23s
CI / Packaging test (push) Successful in 0s
Add the target sh-syntax-check, which triggers bash syntax linting
with shellcheck This commit stops short of making target all depend
on it, because the fallout is impressive.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-24 21:52:35 +02:00
e59d37e907
defs.mk: Use EXE_SH for shell scripts only
To make EXE_SH useful for automated shell syntax checking, remove all
non POSIX shell / bash scripts from that variable, and place the
non-shell scripts into EXE_SCRIPTS.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-24 21:52:35 +02:00
80cafa4737
defs.mk: Add *.slice to LOCAL_SYSTEMD
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m3s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 3m7s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m1s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m9s
CI / Packaging test (push) Successful in 0s
Support automatic installation of *.slice files into the system's
systemd directory.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-24 21:43:11 +02:00
04b5088ca4
defs.mk: Minor code beautification
Uppercase some comments, and remove some dead code.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-24 21:43:11 +02:00
10bde0c05d
topdir.mk: Move PREREQ definition into defs.mk
At present, the PREREQ-variable is effectively only used to detect if
prerequiste packages haven't run "make all" before make is run in a
given package. Also, it's only useful in $(TOPDIR). This commit
splits the variable up into PREREQ_BUILD and PREREQ_RUN, and makes
the variables available in every Makefile of a package by placing
them in defs.mk instead of topdir.mk.

This also fixes a problem that PREREQ was cached before being filled,
hence empty. Which effectively wasn't much of a problem, because it
was basically unused, but still.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-17 20:16:29 +02:00
7396794122
conf/templates: Add subdir
Add $(TOPDIR)/conf/templates as a location for templates, i.e. input
files to the CmdCreateFile template rendering command.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-09 07:45:15 +02:00
99386d5492
conf/project: Add directory and variables
Anticipating future usefulness, add a regular project configuration
directory plus two variables pointing to it:

  JW_PKG_CONF_BASE_DIR        ?= $(firstword $(wildcard $(JW_PKG_DIR)/conf /etc/opt/jw-pkg))
  JW_PKG_CONF_DIR             ?= $(firstword $(wildcard $(JW_PKG_CONF_BASE_DIR)/project $(JW_PKG_CONF_BASE_DIR)))

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-05-31 18:20:31 +02:00
d054e3c343
defs.mk: Add .toml to default config file formats
Anticipating future additions, support installing *.toml as a
standard configuration file format.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-05-31 18:20:31 +02:00
ecbe9d20b3
defs.mk: Fix initial version 1.0.0-0-dev
If a project is not initialized via make pkg-init-%, it doesn't
contain a VERSION file. When CI tries to build and package such a
project, it auto-creates a VERSION file, but a broken one: The
revision isn't properly seperated by a dash but by a dot, which makes
CI give up while parsing it.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-05-14 11:46:41 +02:00
41b0b8f023 defs.mk: Remove installation type SCRIPT
Installation type SCRIPT has beed disabled long ago because of its
overlap with EXE. Remove the dead code around it.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-04-11 14:51:11 +02:00
eb216692eb defs.mk: Add *.yaml to LOCAL_CFG
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-17 13:38:18 +01: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
ed17aaa6c9 make: Align equal signs in *.mk to column 30
Chore: Format equal signs uniformly. They should all be at column 30
but aren't. Fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-16 14:57:50 +01:00
e93338872f defs.mk: Move PKG_FORMAT definition into platform.mk
PKG_FORMAT is now more straightforward to get with from the revised
jw-pkg.py distro info --format '%{cascade}', so do that, and do it in
the context where all the other variables are set from the output of
that command.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 12:55:36 +00:00
521600bc56 projects.mk -> platform.mk: Move definitions up
To remove redundancy, get-os.sh needs to be retired in favor of
pkg.py distro info. It's needed in platform.mk, but the only
definiton of JW_PKG_PY is in projects.mk, so move it, along with the
variables essential for the command:

  include $(JWBDIR)/make/py-version.mk (defining PYTHON)
  JW_PKG_PY
  DEVELOPMENT
  VERSION_FILE

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-02 12:55:36 +00:00
37b436c04f defs.mk: Pass -f $(PKG_FORMAT) to pkg.sh log-install
pkg.sh log-install needs to know what package format it should log
an install for, so specify it.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-15 16:04:33 +00:00
ec093d3cc9 defs.mk: Add $(wildcard *.socket) to LOCAL_SYSTEMD
By default, install systemd socket definitions found in a config
directory.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-12 20:37:10 +01:00
ef52a2810a defs.mk: Add $(wildcard *.timer) to LOCAL_SYSTEMD
By default, install sytemd timer definitions found in a config
directory.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-02-10 09:58:30 +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
31108fc608 defs.mk: Allow INSTALL = $(SUDO) install
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.

So make this possible by:

  $ DEVELOPMENT=false make install

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-12-12 10:20:31 +01:00
f90f5aeebe Everywhere: Replace "JW_BUILD" by "JW_PKG"
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-11-28 13:35:56 +01: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
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
c575537456 defs.mk / rules.mk: Add support for PACKAGE_INSTALL_DIR
PACKAGE_INSTALL_DIR, true by default, can be used to turn off
target dir creation from a directory to avoid duplication from
other packages

Signed-off-by: Jan Lindemann <jan@janware.com>
2024-12-06 14:35:59 +00:00
86ec95f6dc defs.mk / rules.mk: Add .target file support to LOCAL_SYSTEMD
Signed-off-by: Jan Lindemann <jan@janware.com>
2024-12-03 12:28:15 +00:00
a1bf4d9562 make: Remove variables referencing other janware-projects
jw-build is meant as a generic set of tools for building other projects, so
references to projects being built by jw-build introduce a circular dependency.
Remove those references from defs.mk and rules.mk.

Variables removed by this commit:

	BTOOLS_DIR
	FEEDFSD_DIR
	FEEDFS_DIR
	FEEDFS_GUI_DIR
	FEEDFS_OBJECTS_DIR
	FEEDFS_UTILS_DIR
	FEEDFS_WT_DIR
	JUX_SHARED_DIR
	SITE_DIR
	VALDI_DIR
	XCHANGE_DIR

Signed-off-by: Jan Lindemann <jan@janware.com>
2024-07-16 10:41:20 +00:00
069b82b3cd defs.mk: Beautify INSTALLED_RSYSLOG variable
INSTALLED_RSYSLOG contained duplicates, fix that

Signed-off-by: Jan Lindemann <jan@janware.com>
2023-12-18 13:00:40 +00:00
8d2b093cc6 defs.mk: Replace tr invocations by $(TR)
Signed-off-by: Jan Lindemann <jan@janware.com>
2020-12-01 16:21:19 +00:00
50988845d7 defs.mk: Add .hh to SRC_H
Signed-off-by: Jan Lindemann <jan@janware.com>
2020-11-30 16:52:50 +00:00
2a0694a497 defs.mk: Add PRISTINE_MAKE
make carries MAKEFLAGS, PATH, LD_LIBRARY_PATH and umask from the environment to
sub-makes, which sometimes is undesirable. So, instead of make -C,
$(PRISTINE_MAKE) -C will start a sub-make with a minimal environment consisting
of MINIMAL_UMASK, MINIMAL_PATH, MINIMAL_LD_LIBRARY_PATH and MINIMAL_MAKEFLAGS

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-11-19 13:11:51 +00:00
ee012a8d35 defs.mk: Fix PKG_FORMAT for Ubuntu
The PKG_FORMAT variable for Ubuntu points to rpm, which is wrong. Fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-11-13 12:49:25 +00:00
34a42cd0a4 defs.mk: Fix uniq
uniq failed on empty argument lists, fix that

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-11-12 18:44:36 +00:00
23ce1b8642 platform.mk / defs.mk fix: SHELL was referenced before definition
SHELL defaults to /bin/sh on Ubuntu 16, and was used to get-os.sh, which fails

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-08-02 05:48:32 +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
b3659f75b8 defs.mk: Default to 1.0.0-0-dev, if $(TOPDIR)/VERSION is absent
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-29 19:06:41 +00:00
15579e94d3 projects.mk + defs.mk: Make some variables more universally usable
- Remove temporary variable PRJS_DIR
- Add defaults for BUILD_LIBS_PREFIX and BUILD_TOOLS_PREFIX
- Move definitions of varables needed early on from defs.mk
  into projects.mk, such as PYTHON and PYTHON_VERSION

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-24 12:44:14 +00:00
5f396a1f95 defs.mk:: Define variables empty, space and comma
Move definitions of empty, space and comma from targets-tools.mk into
defs.mk.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-21 09:32:54 +00:00
ab5fc0c334 py-defs.mk: Fix installation with predefined PY_INSTALL_DIR
Predefined PY_INSTALL_DIR was ignored prior to this commit, which shuffles the
py-defs.mk variables around considerably. Still some temporary variables
unnecessarily defined with ?=, but some testing would be good prior to further
changes.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-11 08:31:11 +00:00
c480eeaaca defs.mk, make.mk: Add CREATE_PKG_CONFIG variable
It was possible for DEVEL_TARGETS to contain install_PKG_CONFIG without a
package config file being built, fixed that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-03 09:06:41 +00:00
55cc335140 fix: PROJECT = jw-pf-3dprinter -> jw-pf
The contents of the PROJECT variable was misdetected from the directory name in
that everything after a number was discarded. This commit fixes that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-05-19 13:13:14 +00:00
32b9837373 defs.mk, mcu-exe.mk: Code beautification
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-30 10:47:48 +00:00
e54c20de8c defs.mk: Add function uniq
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-29 16:45:20 +00:00