comparison hg-octave-dist.mk @ 4192:438a4bfdc887

new rules for creating a tarball from Octave's hg sources * hg-octave-dist.mk: New file. * Makefile.in: Include hg-octave-dist.mk. (ENV_PATH, ENV_PKG_CONFIG_PATH, ENV_LD_LIBRARY_PATH): Capture values from environment.
author John W. Eaton <jwe@octave.org>
date Mon, 29 Aug 2016 11:21:19 -0400
parents
children 4a414e5b16a4
comparison
equal deleted inserted replaced
4191:851b9f4a6b1c 4192:438a4bfdc887
1 ## Build and Octave tarball distribution from hg sources. The
2 ## resulting tarball may then be used by the default-octave target to
3 ## build. So the typical steps for building Octave from the mercurial
4 ## sources are
5 ##
6 ## ./bootstrap
7 ## ./configure --enable-octave=default
8 ## make hg-octave-dist
9 ## make
10 ##
11 ## The version number set in the mercurial sources for Octave must
12 ## match the one used in src/default-octave.mk.
13
14 ## Set PATH, PKG_CONFIG_PATH, and LD_LIBRARY_PATH to the original
15 ## values from the environment so that we avoid the tools that we've
16 ## built for cross compiling. For these rules to work, you must have
17 ## appropriate versions of the required tool installed outside of the
18 ## mxe-octave build tree. Things like pkg-config and other tools that
19 ## are built for mxe-octave may produce the wrong values for these
20 ## steps, especially if we eventually intend to cross compile Octave.
21 ## Rather than try to work around those issues, it seems simpler to
22 ## just use the system tools for this job.
23
24 HG_OCTAVE_DIST_ENV_FLAGS := \
25 PKG_CONFIG_PATH='$(ENV_PKG_CONFIG_PATH)' \
26 LD_LIBRARY_PATH='$(LD_LIBRARY_PATH)' \
27 PATH='$(ENV_PATH)'
28
29 .PHONY: hg-octave-dist
30 hg-octave-dist: $(BUILD_TOOLS) update-hg-octave-repo
31 cd octave-hg-repo && \
32 rm -rf .build && \
33 mkdir .build && \
34 $(HG_OCTAVE_DIST_ENV_FLAGS) ./bootstrap && \
35 cd .build && \
36 $(HG_OCTAVE_DIST_ENV_FLAGS) ../configure && \
37 $(HG_OCTAVE_DIST_ENV_FLAGS) make -j '$(JOBS)' all && \
38 $(HG_OCTAVE_DIST_ENV_FLAGS) make -j '$(JOBS)' dist && \
39 mv '$(hg-octave_FILE)' '../../pkg/$(hg-octave_FILE)'
40
41 .PHONY: update-hg-octave-repo
42 update-hg-octave-repo:
43 if [ -d octave-hg-repo ]; then \
44 cd octave-hg-repo && hg pull -u; \
45 else \
46 hg clone http://octave.org/hg/octave octave-hg-repo; \
47 fi