view hg-octave-dist.mk @ 4543:7d1e45c2f175

update: more PKG_UPDATE updates, added update-octaveforge target * src/libxml++.mk, src/libxml2.mk, src/libxshmfence.mk, src/libxslt.mk, src/llvm.mk, src/mingwrt.mk, src/msys-libcrypt.mk, src/msys-libopenssl.mk, src/muparser.mk, rc/nsis.mk: update PKG_UPDATE rule * src/of-actuarial.mk, src/of-communications.mk, src/of-control.mk, src/of-data-smoothing.mk, src/of-database.mk, src/of-dataframe.mk, src/of-dicom.mk, src/of-financial.mk, src/of-fits.mk, src/of-fl-core.mk, src/of-fuzzy-logic-toolkit.mk, src/of-ga.mk, src/of-ga.mk, src/of-general.mk, src/of-generate_html.mk, src/of-geometry.mk, src/of-gsl.mk, src/of-image.mk, src/of-instrument-control.mk, src/of-interval.mk, src/of-io.mk, src/of-linear-algebra.mk, src/of-lssa.mk, src/of-ltfat.mk, src/of-mapping.mk, src/of-miscellaneous.mk, src/of-nan.mk, src/of-netcdf.mk, src/of-nurbs.mk, src/of-ocs.mk, src/of-octcdf.mk, src/of-odepkg.mk, src/of-optim.mk, src/of-quaternion.mk, src/of-signal.mk, src/of-sockets.mk, src/of-sparsersb.mk, src/of-specfun.mk, src/of-splines.mk, src/of-statistics.mk, src/of-stk.mk, src/of-strings.mk, src/of-struct.mk, src/of-tisean.mk, src/of-tsa.mk, src/of-video.mk, src/of-windows.mk, src/of-zeromq.mk, src/of-queueing.mk, : use $(OCTAVE_FORGE_PKG_UPDATE) * Makefile.in: added OCTAVE_FORGE_PKG_UPDATE macro, added update-octaveforge target
author John D
date Wed, 22 Nov 2017 15:26:02 -0500
parents 2a8b5cf2085c
children 7eebfda7daa1
line wrap: on
line source

## Build and Octave tarball distribution from hg sources.  The
## resulting tarball may then be used by the default-octave target to
## build.  So the typical steps for building Octave from the mercurial
## sources are
##
##  ./bootstrap
##  ./configure --enable-octave=default
##  make hg-octave-dist
##  make
##
## The version number set in the mercurial sources for Octave must
## match the one used in src/default-octave.mk.
##
## We also install the resulting binary to run natively when
## building packages during a cross build.

## Set PATH, PKG_CONFIG_PATH, and LD_LIBRARY_PATH to the original
## values from the environment so that we avoid the tools that we've
## built for cross compiling.  For these rules to work, you must have
## appropriate versions of the required tool installed outside of the
## mxe-octave build tree.  Things like pkg-config and other tools that
## are built for mxe-octave may produce the wrong values for these
## steps, especially if we eventually intend to cross compile Octave.
## Rather than try to work around those issues, it seems simpler to
## just use the system tools for this job.

HG_OCTAVE_DIST_ENV_FLAGS := \
  PKG_CONFIG_PATH='$(ENV_PKG_CONFIG_PATH)' \
  LD_LIBRARY_PATH='$(LD_LIBRARY_PATH)' \
  PATH='$(ENV_PATH)'

.PHONY: hg-octave-dist
hg-octave-dist: $(BUILD_TOOLS) update-hg-octave-repo
	cd octave-hg-repo && \
	rm -rf .build && \
	mkdir .build && \
	$(HG_OCTAVE_DIST_ENV_FLAGS) ./bootstrap && \
	cd .build && \
	$(HG_OCTAVE_DIST_ENV_FLAGS) ../configure --prefix=$(ROOT_PREFIX) && \
	$(HG_OCTAVE_DIST_ENV_FLAGS) make -j '$(JOBS)' all && \
	$(HG_OCTAVE_DIST_ENV_FLAGS) make -j '$(JOBS)' install && \
	$(HG_OCTAVE_DIST_ENV_FLAGS) make -j '$(JOBS)' dist && \
	mv '$($(OCTAVE_TARGET)_FILE)' '$(PKG_DIR)'

.PHONY: update-hg-octave-repo
update-hg-octave-repo:
	if [ -d octave-hg-repo ]; then \
	  cd octave-hg-repo \
	    && hg pull && hg update $(hg-octave-branch); \
	else \
	  hg clone http://octave.org/hg/octave octave-hg-repo \
	    && cd octave-hg-repo \
	    && hg pull && hg update $(hg-octave-branch); \
	fi