Mercurial > mxe-octave
diff Makefile.in @ 5531:eae508c12529
Add build rule for build-octave (bug #49503).
* src/build-octave.mk: Add new build rule for build-octave which can be used for
cross-building binary packages that depend on Octave as a build tool.
* dist-files.mk: Add new file to list.
* index.html: Add new package to list.
* src/of-communications.mk, src/of-image.mk, src/of-mapping.mk,
src/of-optiminterp.mk, src/of-sparsersb.mk, src/of-statistics.mk,
src/of-windows.mk: Add optional dependency on build-octave.
* configure.ac: Add new configure switch "--disable-system-octave" that is
needed to build the build-octave package.
* Makefile.in: Add variable "USE_SYSTEM_OCTAVE". Exclude build-octave from the
default build tools and build it only if a package explicitly depends on it.
Display warning about missing native Octave version only if necessary.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Tue, 08 Sep 2020 23:04:38 +0200 |
parents | fb50ae69121c |
children | 13628d1d41e2 |
line wrap: on
line diff
--- a/Makefile.in Tue Sep 08 16:04:48 2020 +0200 +++ b/Makefile.in Tue Sep 08 23:04:38 2020 +0200 @@ -65,6 +65,12 @@ # if cross, compiling, this also means we will attempt to create cross mkoctfile ENABLE_BINARY_PACKAGES := @ENABLE_BINARY_PACKAGES@ +# Set to "no" to build a minimal Octave that runs on the build system. +# That version can be used for cross-building binary packages that depend +# on Octave as a build tool. If "yes", it is tried to use an Octave that +# is already installed on the build system (default is "yes"). +USE_SYSTEM_OCTAVE := @USE_SYSTEM_OCTAVE@ + # create and install devel tools (default no) ENABLE_DEVEL_TOOLS := @ENABLE_DEVEL_TOOLS@ @@ -257,6 +263,8 @@ BUILD_COMPILER_TOOLS := build-gcc build-binutils BUILD_TOOLS := $(ALL_BUILD_TOOLS) +# build-octave is added as an explicit dependency in the of- packages that need it +BUILD_TOOLS := $(filter-out build-octave, $(BUILD_TOOLS)) # Building flex for native mingw fails, so disable it. ifeq ($(MXE_NATIVE_MINGW_BUILD),yes) REQUIREMENTS += flex @@ -307,6 +315,7 @@ TMP_DIR = $(TOP_BUILD_DIR)/tmp-$(1) MAKEFILE := $(TOP_BUILD_DIR)/Makefile PKGS := $(filter-out $(ALL_BUILD_TOOLS), $(shell $(SED) -n 's/^.* class="package">\([^<]*\)<.*$$/\1/p' '$(TOP_DIR)/index.html')) +PKGS += build-octave ENV_PATH := $(PATH) PATH := $(BUILD_TOOLS_PREFIX)/bin:$(PATH) @@ -723,9 +732,13 @@ @echo '[check requirements]' $(foreach REQUIREMENT,$(REQUIREMENTS),$(call CHECK_REQUIREMENT,$(REQUIREMENT))) ifneq ($(MXE_NATIVE_BUILD),yes) + ifeq ($(USE_SYSTEM_OCTAVE),yes) + ifeq ($(ENABLE_BINARY_PACKAGES),yes) @if ! octave -W --version | head -1 | grep ' \($($(OCTAVE_TARGET)_VERSION)\)$$' >/dev/null; then \ - echo "Warning - could not find native build version $($(OCTAVE_TARGET)_VERSION) of octave - some packages may fail, but continuing"; \ + echo "Warning - could not find native build version $($(OCTAVE_TARGET)_VERSION) of Octave - some packages may fail, but continuing"; \ fi + endif + endif endif @[ -d '$(STAMP_DIR)' ] || mkdir -p '$(STAMP_DIR)' @if test "$(USE_SYSTEM_GCC)" = yes; then \