Commit graph

21 commits

Author SHA1 Message Date
1154cb984c ldlibpath.mk: Replace ifndef by ifeq ($(origin, ...))

As per info make, it turns out that ifndef SOME_VAR is true for SOME_VAR defined to an empty value. This is unusable for caching, so replace it with ifeq ($(origin SOME_VAR),undefined).

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-01-28 15:24:13 +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
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
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
3365aa3db6 make: Replace BUILD_XXX make flag variables by FINAL_XXX

The following BUILD_XXX variables are renamed to their respective FINAL_XXX counterparts, as that name is more expressive:

BUILD_CFLAGS, BUILD_CPPFLAGS, BUILD_CXXFLAGS, BUILD_EXTRA_DEBUG_FLAGS, BUILD_INCLUDE, BUILD_LDFLAGS, BUILD_LIBFLAGS, BUILD_LPPFLAGS

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-24 12:58:53 +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
5459f98adc Define PATH and LD_LIBRARY_PATH with := rather than =

For performance reasons, define PATH and LD_LIBRARY_PATH with := instead of = This is a risky commit as it might break testing due to missing libraries

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-05-04 22:30:58 +00:00
4ed00f0186 path-rules.mk: Add file

Move ldlibpath target from ldlibpath.mk into newly created path-rules.mk.

Signed-off-by: Jan Lindemann <jan@janware.com>
2017-12-17 14:57:48 +00:00
5af9df5ef1 ldlibpath.mk: Temporarily disable multiple-inclusion preventer

This mutilated LD_LIBRARY_PATH under some circumstances, to be investigated further.

Signed-off-by: Jan Lindemann <jan@janware.com>
2017-12-11 18:50:48 +00:00
2594143b1f make: Improvements to a couple of makefiles

- Depend.mk, ldlibpath.mk: add multiple inclusion guards - Flex-bison.mk some dependency fiddling - Py-defs.mk: remove *.pyc on clean

Signed-off-by: Jan Lindemann <jan@janware.com>
2017-10-30 12:02:43 +00:00
587b1ccfb6 ldlibpath.mk: Minimal code beautification
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-08-20 09:00:05 +00:00
db1e6097fa ldlibpath.mk, py-defs.mk, rules.mk: Add ldlibpath.mk to py-defs.mk

Since python might need bound C libraries, too, this looks like a good idea.

Signed-off-by: Jan Lindemann <jan@janware.com>
2017-08-01 21:53:36 +00:00
25b5bda6bb ldlibpath.mk: Figure out export PATH via projects.py
Signed-off-by: Jan Lindemann <jan@janware.com>
2016-03-06 15:16:24 +00:00
bac93b0a82 ldlibpath.mk: Create LD_LIBRARY_PATH from projects.py
Signed-off-by: Jan Lindemann <jan@janware.com>
2016-01-27 16:59:46 +00:00
Jan Lindemann
634992f447 *.mk: Prefix non-env C/C++ flags with BUILD_

Prefix all CFLAGS / CPPFLAGS / LDFLAGS with BUILD_ to distinguish them from flags read from the environment (and getting longer and longer with +=).

2012-02-04 16:48:58 +00:00
Jan Lindemann
9f4e02e618 make: Replace sed by $(SED) 2012-02-04 10:59:02 +00:00
Jan Lindemann
63286f6576 ldlibpath.mk: Prepending PATH with paths from EXE_SEARCH_PATH 2010-11-20 16:04:01 +00:00
Jan Lindemann
b448274c97 run.mk: LD_LIBRARY_PATH and DLL_PATH -> ldlibpath.mk

Centralize all generation of LD_LIBRARY_PATH and DLL_PATH in ldlibpath.mk.

2009-06-29 14:56:58 +00:00
Jan Lindemann
85ebee471b ldlibpath.mk: Use NEW_LD_LIB_PATH as default for LD_LIBRARY_PATH 2007-08-18 20:32:39 +00:00
Jan Lindemann
9d141fe861 exe.mk: Split defs and rules -> ldlibpath.mk, rules.mk

Push LD_LIBRARY_PATH defs from exe.mk into ldlibpath.mk, and rules into rules.mk.

2005-06-28 13:52:44 +00:00