Commit graph

24 commits

Author SHA1 Message Date
ced42938e1 projects.mk / jw-projects.py: Support tmpl_dir && tmpls-dir
For a project to supply templates, it needs to advertise their
location. For this, the tmpl_dir make variable is added to
projects.mk. If other-project wants to get hold of some-project's
templates, it can do, e.g.:

  TEMPLATES = $(wilcard $(call tmpl_dir,some-project)/*.tmpl)

To achieve this, support for the tmpls-dir command is added to
jw-projects.py.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-12-23 11:07:37 +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
60ef137bc3 projects.mk, py-defs.mk, py-version.mk: Add py-version.mk
This commit adds py-version.mk, eliminating redundancy between projects.mk and
py-defs.mk in setting up the Python version early.
2025-02-22 09:04:17 +00:00
17851c9d11 projects.mk / py-defs.mk: Support Python 3.10
The current globbing pattern for filling the PYTHON variable doesn't
account for the fact that /usr/bin/python3.X might have more than one
digit for X, fix that

Signed-off-by: Jan Lindemann <jan@janware.com>
2022-10-04 11:05:24 +00:00
f3febfa460 py-defs.mk, projects.mk: Fix /usr/bin/python globbing on OpenSUSE
Signed-off-by: Jan Lindemann <jan@janware.com>
2020-05-18 13:15:35 +00:00
caf33841b4 py-defs.mk, projects.mk: Use latest install Python
Use $(lastword $(shell ls -v /usr/bin/python[0-9]*)) for the Python version to use.

Signed-off-by: Jan Lindemann <jan@janware.com>
2020-05-16 13:22:51 +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
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
13fa28e23f make, scripts: Flip some more switches from pathon 2 to 3 (untested!)
This commit flips some more switches from Python 2 to Python 3 in makefiles and
Python code. Build runs through, but it's still likely to break things.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-06-02 12:28:13 +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
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
9e245c986e make: Further improve build time
This commit sees several improvements to the build performance:

- Introduce cache.mk, which creates makefiles caching often used
  variables, per tree and per project.
- Define more variables with := enclosed in condistions, instead of
  defining them with ?=, because the RHS of ?= is expanded deferredly.
- Add more definitions for executables.
- Move some more specialized definitions out into specialized makefiles,
  notably htdocs.mk and tmpl.mk

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-28 13:22:12 +00:00
316435bb78 $(MODDIR)/make/defs.mk: Split off defs-cpp.mk with C++ definitions
C++ definitions are numerous, and they shouldn't pollute variable space and
performance outside of directories containing C++ files. This commit pushes
them into a defs-cpp.mk file.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-27 20:46:54 +00:00
0a04f98785 projects.mk: Disable proj_query macros for undefined $TOPDIR
proj_query based commands run projects.py, which needs $(TOPDIR), which in turn
is undefined, notably for standalone-exe.mk. This commit avoids related
warnings.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-14 09:00:41 +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
75bc87ad44 make, scripts: Rename CVS_PROJ_DIR to PROJECTS_DIR
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-16 10:42:23 +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
3f782d3f3f py-defs/py-mod.mk: Fix __init__.py generation
Signed-off-by: Jan Lindemann <jan@janware.com>
2017-07-25 15:04:44 +00:00
c5be183a73 projects.mk: Add variable proj_query_cmd
proj_query_command is not a callable function, as opposed to proj_query, which
now uses it. This adds the possibilty to use it multiple times in pipes.

Signed-off-by: Jan Lindemann <jan@janware.com>
2017-07-22 18:14:58 +00:00
55fa0eaec5 $(TOPDIR), make, scripts: Search-and-replace ytools -> jw-build
This project was copied from ytools, with anything not related to providing
build-functionality left out. This commit replaces the occurences of ytools
with jw-build, and removes some but most certainly not all legacy ytools
references.

Signed-off-by: Jan Lindemann <jan@janware.com>
2017-04-07 12:15:48 +00:00
cb1e735f9c make: Add projects.mk and prefixed win32 objects with win32-
- Add new makefile projects.mk, which is the place to define the minimally
  required set of variables to get a project's makefile oriented about
  the build machinery itself, mostly its locations in the file system. This
  also includes querying other projects. It's been pushed into a seperate
  makefile includeable early in the Makefile hierarchy, so that other
  special build variables (i.e. TARGET) can be specialized from within the
  project later to define build characteristics.
- Prefixed object files with $(FLAVOUR_PREFIX), to allow for building two
  targets from the same directory

Signed-off-by: Jan Lindemann <jan@janware.com>
2016-12-25 13:45:12 +00:00