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>
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>
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>
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>
- 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>
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>
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>
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>
- 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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>