Mercurial > mxe-octave
comparison 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 |
comparison
equal
deleted
inserted
replaced
5530:1b16d40c6611 | 5531:eae508c12529 |
---|---|
62 ENABLE_FORTRAN_INT64 := @ENABLE_FORTRAN_INT64@ | 62 ENABLE_FORTRAN_INT64 := @ENABLE_FORTRAN_INT64@ |
63 | 63 |
64 # create binary octave forge tools. | 64 # create binary octave forge tools. |
65 # if cross, compiling, this also means we will attempt to create cross mkoctfile | 65 # if cross, compiling, this also means we will attempt to create cross mkoctfile |
66 ENABLE_BINARY_PACKAGES := @ENABLE_BINARY_PACKAGES@ | 66 ENABLE_BINARY_PACKAGES := @ENABLE_BINARY_PACKAGES@ |
67 | |
68 # Set to "no" to build a minimal Octave that runs on the build system. | |
69 # That version can be used for cross-building binary packages that depend | |
70 # on Octave as a build tool. If "yes", it is tried to use an Octave that | |
71 # is already installed on the build system (default is "yes"). | |
72 USE_SYSTEM_OCTAVE := @USE_SYSTEM_OCTAVE@ | |
67 | 73 |
68 # create and install devel tools (default no) | 74 # create and install devel tools (default no) |
69 ENABLE_DEVEL_TOOLS := @ENABLE_DEVEL_TOOLS@ | 75 ENABLE_DEVEL_TOOLS := @ENABLE_DEVEL_TOOLS@ |
70 | 76 |
71 # use qt5 instead of qt4 | 77 # use qt5 instead of qt4 |
255 ## generate output that runs on the host system (TARGET in MXE terms). | 261 ## generate output that runs on the host system (TARGET in MXE terms). |
256 ALL_BUILD_TOOLS := $(shell $(SED) -n 's/^.* class="package">\(build-[^<]*\)<.*$$/\1/p' '$(TOP_DIR)/index.html') | 262 ALL_BUILD_TOOLS := $(shell $(SED) -n 's/^.* class="package">\(build-[^<]*\)<.*$$/\1/p' '$(TOP_DIR)/index.html') |
257 | 263 |
258 BUILD_COMPILER_TOOLS := build-gcc build-binutils | 264 BUILD_COMPILER_TOOLS := build-gcc build-binutils |
259 BUILD_TOOLS := $(ALL_BUILD_TOOLS) | 265 BUILD_TOOLS := $(ALL_BUILD_TOOLS) |
266 # build-octave is added as an explicit dependency in the of- packages that need it | |
267 BUILD_TOOLS := $(filter-out build-octave, $(BUILD_TOOLS)) | |
260 # Building flex for native mingw fails, so disable it. | 268 # Building flex for native mingw fails, so disable it. |
261 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes) | 269 ifeq ($(MXE_NATIVE_MINGW_BUILD),yes) |
262 REQUIREMENTS += flex | 270 REQUIREMENTS += flex |
263 BUILD_TOOLS := $(filter-out build-flex, $(BUILD_TOOLS)) | 271 BUILD_TOOLS := $(filter-out build-flex, $(BUILD_TOOLS)) |
264 endif | 272 endif |
305 TIMESTAMP := $(shell date +%Y%m%d_%H%M%S) | 313 TIMESTAMP := $(shell date +%Y%m%d_%H%M%S) |
306 PKG_DIR := @PKG_DIR@ | 314 PKG_DIR := @PKG_DIR@ |
307 TMP_DIR = $(TOP_BUILD_DIR)/tmp-$(1) | 315 TMP_DIR = $(TOP_BUILD_DIR)/tmp-$(1) |
308 MAKEFILE := $(TOP_BUILD_DIR)/Makefile | 316 MAKEFILE := $(TOP_BUILD_DIR)/Makefile |
309 PKGS := $(filter-out $(ALL_BUILD_TOOLS), $(shell $(SED) -n 's/^.* class="package">\([^<]*\)<.*$$/\1/p' '$(TOP_DIR)/index.html')) | 317 PKGS := $(filter-out $(ALL_BUILD_TOOLS), $(shell $(SED) -n 's/^.* class="package">\([^<]*\)<.*$$/\1/p' '$(TOP_DIR)/index.html')) |
318 PKGS += build-octave | |
310 | 319 |
311 ENV_PATH := $(PATH) | 320 ENV_PATH := $(PATH) |
312 PATH := $(BUILD_TOOLS_PREFIX)/bin:$(PATH) | 321 PATH := $(BUILD_TOOLS_PREFIX)/bin:$(PATH) |
313 ifeq ($(USE_CCACHE),yes) | 322 ifeq ($(USE_CCACHE),yes) |
314 PATH := $(BUILD_TOOLS_PREFIX)/bin/ccache:$(PATH) | 323 PATH := $(BUILD_TOOLS_PREFIX)/bin/ccache:$(PATH) |
721 check-requirements: $(STAMP_DIR)/check-requirements | 730 check-requirements: $(STAMP_DIR)/check-requirements |
722 $(STAMP_DIR)/check-requirements: $(MAKEFILE) | 731 $(STAMP_DIR)/check-requirements: $(MAKEFILE) |
723 @echo '[check requirements]' | 732 @echo '[check requirements]' |
724 $(foreach REQUIREMENT,$(REQUIREMENTS),$(call CHECK_REQUIREMENT,$(REQUIREMENT))) | 733 $(foreach REQUIREMENT,$(REQUIREMENTS),$(call CHECK_REQUIREMENT,$(REQUIREMENT))) |
725 ifneq ($(MXE_NATIVE_BUILD),yes) | 734 ifneq ($(MXE_NATIVE_BUILD),yes) |
735 ifeq ($(USE_SYSTEM_OCTAVE),yes) | |
736 ifeq ($(ENABLE_BINARY_PACKAGES),yes) | |
726 @if ! octave -W --version | head -1 | grep ' \($($(OCTAVE_TARGET)_VERSION)\)$$' >/dev/null; then \ | 737 @if ! octave -W --version | head -1 | grep ' \($($(OCTAVE_TARGET)_VERSION)\)$$' >/dev/null; then \ |
727 echo "Warning - could not find native build version $($(OCTAVE_TARGET)_VERSION) of octave - some packages may fail, but continuing"; \ | 738 echo "Warning - could not find native build version $($(OCTAVE_TARGET)_VERSION) of Octave - some packages may fail, but continuing"; \ |
728 fi | 739 fi |
740 endif | |
741 endif | |
729 endif | 742 endif |
730 @[ -d '$(STAMP_DIR)' ] || mkdir -p '$(STAMP_DIR)' | 743 @[ -d '$(STAMP_DIR)' ] || mkdir -p '$(STAMP_DIR)' |
731 @if test "$(USE_SYSTEM_GCC)" = yes; then \ | 744 @if test "$(USE_SYSTEM_GCC)" = yes; then \ |
732 $(INSTALL) -d '$(BUILD_TOOLS_PREFIX)/bin' ; \ | 745 $(INSTALL) -d '$(BUILD_TOOLS_PREFIX)/bin' ; \ |
733 $(INSTALL) -m 755 $(TOP_DIR)/tools/config.guess '$(BUILD_TOOLS_PREFIX)/bin/config.guess' ; \ | 746 $(INSTALL) -m 755 $(TOP_DIR)/tools/config.guess '$(BUILD_TOOLS_PREFIX)/bin/config.guess' ; \ |