Commit graph

473 commits

Author SHA1 Message Date
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
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
cec620c00e defs.mk: Reduce multiple invocations of external commands
Many external commands are called unnecessarily often, because either there's a
GNU Make internal alternative, or because they are invoked from within a
recursively defined variable. This patch adresses that and lessens make
invocation time per directory by factor 3.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-27 16:44:02 +00:00
e16b4c6d82 defs.mk: Fix MAKE_BENCHMARK support
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-27 14:49:05 +00:00
e5133234bb defs.mk: Fix broken TARGET_ARCH, _VENDOR, _OS, _ABI
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-27 14:18:35 +00:00
9f2524c736 defs.mk: Fix missing ARCH_32 constant
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-27 13:56:13 +00:00
a0a6dec506 defs.mk: Some cleanup in target platform variables
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-27 11:56:57 +00:00
b37359a725 $(MODDIR)/make/defs.mk: Replace variable OS with OS_NAME_VERSION
OS_NAME_VERSION is less ambiguous.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-27 10:22:27 +00:00
bcbc9f83bc defs.mk: Change build C|CPP|LDFLAGS order
Order is now: $(LOCAL_CFLAGS) $(PROJECT_CFLAGS) $(COMPLILER_CFLAGS)
which resulted in header files specified in $(LOCAL_CFLAGS) found
after those of $(PROJECT_CFLAGS).

Still not optimal, as this way other general flags, e.g. optimization
flags, override more specialized ones. Maybe use INCLUDES instead.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-30 16:23:36 +00:00
bcebe4dbd3 defs.mk: Fix commit 6fc4125
Commit 6fc4125 introduced broken installation paths if PROJECT was
auto-detected. It included the version.

Also include *.ini into LOCAL_CFG by default.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-30 16:23:15 +00:00
8d30bbf748 defs.mk, get-os.sh: Define OSTYPE as linux on Linux
The environment variable OSTYPE contains different values
on Linux: Linux on OpenSUSE and linux-gnu on RHEL / CentOS

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-30 16:22:58 +00:00
f502fcd9c2 defs.mk: Remove some unnecessary invocations of /bin/pwd
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-08 07:14:44 +00:00
98e7606029 defs.mk, rpmdist.mk, pkg.sh: Fix detection of rpmbuild path
$HOME/rpmbuild was not correctly assumed as build directory if it doesn't exist.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-03 20:00:01 +00:00
07e71c6710 defs.mk: Add RELEASES file to installed documentation
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-27 22:12:17 +00:00
f19831245f make: Support GNUmakefile too, where applicable
Add support for GNUmakefile, where originally only Makefile was supported.
Not done everywhere, as some of the code involving makefiles is dead
anyway.

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-27 17:30:10 +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
e827efadd5 make, scripts: Replace list-vcs-files.sh by scm.sh ls-files
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-16 10:30:49 +00:00
9b532fd601 make, scripts: Rename list-cvs-files.sh to list-vcs-files.sh
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-13 18:15:12 +00:00
378e46f8b6 defs.mk: Beautify gcc and ld version parsing
And be compatible with CentOS while at it

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-13 10:42:56 +00:00
0c496d051e defs.mk, projects-dir.mk, projs-dir.mk: Fix build on CentOS
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-12 15:24:13 +00:00
d684f198b2 make: Add dev-utils.mk for convenience targets
dev-utils.mk is meant to provide targets like install-to-system,
which will be invoked during development

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-11-27 15:10:18 +00:00
e4bf491d31 defs.mk: Add support for LOCAL_EXTRA_CFG
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-11-24 23:23:13 +00:00
75bf600518 defs.mk: Point INSTALL_DOCDIR to DOC_PREFIX
This used to point to $(PREFIX). Changing it broke the build,
as it expected the VERSION file below PREFIX. This should work
now, as /usr/share/doc/packages was added to the search path
of the VERSION file.

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-11-18 12:35:38 +00:00
a8ccd12503 defs.mk: Add *.jw-tmpl to LOCAL_CFG
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-11-10 07:57:27 +00:00