Commit graph

497 commits

Author SHA1 Message Date
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
9c773838c7 make: Improve flash-fetch targets
- Add support MCU_FLASH_BANK_NAME to support multiple banks
- Prefix binaries with TARGET_PRODUCT, if defined
- Fix flash data for stm32f769i-disco

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-29 13:32:16 +00:00
419d3b2a08 defs-cpp.mk, defs.mk, platform.mk: More cleanup to defs-cpp.mk
- Group more consistently into overall default choices, template cascade and
  compiler flags
- Add definitions for st-nucleo-f103rb (for now)

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-20 15:06:25 +00:00
594becf931 Fix: CREATE_DEVEL wasn't set to true when it should
Fix a situation in which no devel RPM package was built

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-17 15:02:33 +00:00
7eca86c5a1 defs.mk, mcu-defs.mk: Search for openocd config in search path
Add variables around MCU_OPENOCD_CFG_SEARCH_PATH and go search
config there

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-13 10:48:15 +00:00
e66aa18e3f defs.mk: Code beautification
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-09 11:49:40 +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
cb87d2b278 defs.mk, defs-cpp.mk: Some more reordering of compiler flags
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 14:50:05 +00:00
59da607e12 defs.mk, platform.mk: Include pre-local.mk and cache.mk from platform.mk
platform.mk is sometimes included before defs.mk, e.g. from
$(TOPDIR)/make/proj.mk, then these definitions are necessary

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-03 09:56:11 +00:00
094f04d02e defs.mk: Include platform.mk from projects.mk
This is needed for MOD_SCRIPT_DIR

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-02 19:59:53 +00:00
f9d398d219 make: Fix MinGW build machinery machinery
This commit makes it possible to successfully run "make all" against ytools'
again, with TARGET_TUPLE set to i686-ms-w64-mingw. Lots of minor and major
tweaks here and there.

The biggest diff is a move of the architecture-related definitions into
platform.mk. The are needed pretty early on, so that seems reasonable.

Making this work again is part of the larger effort to support cross
buildchains in a more concise way, i.e. without so many if ($(TARGET),mingw))
all over the place. TARGET's relevance should dwindle, until it's finally taken
over by the TARGET_XXX variables extracted from TARGET_TUPLE or TARGET_TRIPLET.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-02 17:21:48 +00:00
ac2f4f6cc7 Fix: JANWARE_WiKI for client jw needs a conditional
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-02 09:50:58 +00:00
f9f437496d defs.mk: Somewhat more consistent indentation of conditionals
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-01 11:08:34 +00:00
8bb94c6f57 defs.mk / defs-cpp.mk: Some reordering of variables
Reordered some variables in defs.mk and defs-cpp.mk for clarity. Most notably
FULL_NAME was moved back into defs.mk, which amounts to a bugfix.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-03-01 11:03:23 +00:00
f40356cf59 make/*.mk: More performance tweaks
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-28 16:12:58 +00:00
3dd55cf067 Further improve build time: Try to avoid calling projects.py
This commit tries to remove the necessity to call projects.py from $(TOPDIR) to
speed up recursive builds over all projects yet again. This is a major
undertaking. There are two variables which are filled py projects.py in
$(TOPDIR): PREREQ and PREREQ_DIRS. Sadly, the latter is a path relative to
$(TOPDIR)/make, so this is kind of pointless. Unless the cache is maintained in
$(TOPDIR), a thing I tried to avoid. So this commit is only able to cache
$(PREREQ), not $(PREREQ_DIRS), which still is a hassle. Introduced defs-dirs.mk
for that, to make it accessible to make.mk, and modified all the other parts of
the machinery, too.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-28 14:48:57 +00:00