Commit graph

1,823 commits

Author SHA1 Message Date
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
ab872fe334 git-submod.mk: Add support for USE_USER_URL
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-28 16:12:31 +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
54d5790167 $(MODDIR)/make/defs.mk: Set HDRDIR_SCOPE_PREFIX = $(PROJECT)
Set HDRDIR_SCOPE_PREFIX = $(PROJECT) by default.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-27 17:29:59 +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
6518acdb5a mcu-defs.mk, mcu-topdir.mk: Add mcu-defs.mk and mcu-topdir.mk
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-27 10:22:24 +00:00
2061d731f5 projects-dir.mk: Add time measurement to make all
The "all" target's command is now preceded by /usr/bin/time
by default

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-16 10:16:19 +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
73f97ba3b4 rpmdist.mk: Add target pkg-build-install
The target comes in handy for installing all packages in a dependency list not
already installed.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-05 15:02:35 +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
f1d9bba070 targets-tools.mk: Fix HDRDIR_SCOPE_SUFFIX for nested include dir structure
The attempt to have local include directory with HDRDIR_SCOPE_SUFFIX
pointing to the working directory failed the last time around. This
commit tries to fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-30 16:23:29 +00:00
88bf4b381b conf.mk, crontab.mk: Fix accidental cleanup of .h in conf.mk and crontab.mk
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-30 16:23:24 +00:00
9fd2f3f9ec topdir.mk: Remove *dist* with topdir.distclean
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-30 16:23:20 +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
6a4092b8af topdir.mk: Don't set default SUBDIRS if ORDERED_SUBDIRS is set
If ORDERED_SUBDIRS is set, SUBDIRS should by default start with
$(ORDERED_SUBDIRS), and filled up with what $(FIND_SUBDIRS) turns up.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-30 16:23:07 +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
19e4095c94 proj.mk: Define MODDIR with ?=, to allow external jw-build
jw-build can handle its own builds and releases, but fixing that can
be nicer if the development and the test directory are seperate

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-08 11:12:32 +00:00
bb58932e24 git-cvs-bridge.mk: Add support for GIT_CVSIMPORT_EXTRA_ARGS
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-08 11:03:36 +00:00
c713793e16 srcdist.mk: Make wd-upload work with upload-defs.mk
wd-upload doesn\'t work at all, because it clashed with rpmdist.mk defining
stuff used by the upload-*.mk files. The RPM-side of things is left untested.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-08 10:53:32 +00:00
c8e664bcb9 Makefile, git-cvs-bridge.mk, srcdist.mk: Add git-cvs-bridge.mk
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-08 08:55:17 +00:00
9f4d0adf5f srcdist.mk: Trade obsolete contents for VCS-aware tarball generation
Ditch the old and mostly dysfunctional contents of srcdist.mk and refill it
with rules to generate a source code tarball containing version control meta
files.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-08 08:09:06 +00:00
c12b242a72 upload-*.mk: Remove redundant variable definitions
Merge redundant upload definitions from upload.mk / upload-defs.mk.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-08 07:26:59 +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
f28afc777c make, scripts: Add support for [pkg.provides.xxx]
Add Support for manually specifying arbitrary package capabilities in
project.conf.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-07 14:34:58 +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
c17d563991 topdir.mk: Run make git-update-project-description after initializing git repo
Signed-off-by: Jan Lindemann <jan@janware.com>
2019-01-03 11:33:31 +00:00
ed8b3918cc py-defs.mk: Allow PY_INSTALL_DIR to be overridden (?=)
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-28 13:46:23 +00:00
f8b575f42d bin.mk: Fix missing include $(MODDIR)/make/defs.mk
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-28 13:22:03 +00:00
d436ed880e rpmdist.mk: Minimal code beautification
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-27 22:33:17 +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
46e653a391 swig.mk: Add basic support for SWIG_TARGET java
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-27 17:31:30 +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
14c451854b projects.mk, topdir.mk: Minor code beautification
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-27 17:03:53 +00:00
4d8ff72147 make: Add multiple inclusion preventers around makefile rules
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-27 17:02:19 +00:00
621c39f076 rules.mk: Pass -D to /usr/bin/install $(BUILD_XXX)/%
This is an experimental commit, mostly facilitating creation of more intricate
include file structures below $(TOPDIR)/include. Probably doesn't hurt but is
only part of the story, since proper clean target support isn't provided per
se.

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-27 16:59:29 +00:00
eb97f44ddb rpmdist.mk: Make pkg-build.dist depend on $(VERSION_FILE)
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-27 16:59:28 +00:00
626dde6388 projects-dir.mk: StrictHostKeyChecking=no
Add JW_BUILD_SSH_EXTRA_OPTS += -o StrictHostKeyChecking=no.

Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-26 13:05:02 +00:00
823840d823 topdir.mk: Add target echo-hash to topdir.mk
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-16 18:45:24 +00:00
cad556cf37 Fix: Cvs-admin.sh was run on the wrong machine
Signed-off-by: Jan Lindemann <jan@janware.com>
2018-12-16 17:25:19 +00:00