Mercurial > mxe-octave
annotate hg-octave-dist.mk @ 4647:7eebfda7daa1
modify for new octave mercurial location (Bug #53555)
* hg-octave-dist.mk: change repo location
author | John Donoghue |
---|---|
date | Thu, 05 Apr 2018 16:40:33 -0400 |
parents | 2a8b5cf2085c |
children | 00a24f9b9cae |
rev | line source |
---|---|
4192
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
1 ## Build and Octave tarball distribution from hg sources. The |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
2 ## resulting tarball may then be used by the default-octave target to |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
3 ## build. So the typical steps for building Octave from the mercurial |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
4 ## sources are |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
5 ## |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
6 ## ./bootstrap |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
7 ## ./configure --enable-octave=default |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
8 ## make hg-octave-dist |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
9 ## make |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
10 ## |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
11 ## The version number set in the mercurial sources for Octave must |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
12 ## match the one used in src/default-octave.mk. |
4321
8ec05e08aa22
hg-octave-dist: Also install native Octave
John W. Eaton <jwe@octave.org>
parents:
4196
diff
changeset
|
13 ## |
8ec05e08aa22
hg-octave-dist: Also install native Octave
John W. Eaton <jwe@octave.org>
parents:
4196
diff
changeset
|
14 ## We also install the resulting binary to run natively when |
8ec05e08aa22
hg-octave-dist: Also install native Octave
John W. Eaton <jwe@octave.org>
parents:
4196
diff
changeset
|
15 ## building packages during a cross build. |
4192
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
16 |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
17 ## Set PATH, PKG_CONFIG_PATH, and LD_LIBRARY_PATH to the original |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
18 ## values from the environment so that we avoid the tools that we've |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
19 ## built for cross compiling. For these rules to work, you must have |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
20 ## appropriate versions of the required tool installed outside of the |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
21 ## mxe-octave build tree. Things like pkg-config and other tools that |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
22 ## are built for mxe-octave may produce the wrong values for these |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
23 ## steps, especially if we eventually intend to cross compile Octave. |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
24 ## Rather than try to work around those issues, it seems simpler to |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
25 ## just use the system tools for this job. |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
26 |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
27 HG_OCTAVE_DIST_ENV_FLAGS := \ |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
28 PKG_CONFIG_PATH='$(ENV_PKG_CONFIG_PATH)' \ |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
29 LD_LIBRARY_PATH='$(LD_LIBRARY_PATH)' \ |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
30 PATH='$(ENV_PATH)' |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
31 |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
32 .PHONY: hg-octave-dist |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
33 hg-octave-dist: $(BUILD_TOOLS) update-hg-octave-repo |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
34 cd octave-hg-repo && \ |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
35 rm -rf .build && \ |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
36 mkdir .build && \ |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
37 $(HG_OCTAVE_DIST_ENV_FLAGS) ./bootstrap && \ |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
38 cd .build && \ |
4321
8ec05e08aa22
hg-octave-dist: Also install native Octave
John W. Eaton <jwe@octave.org>
parents:
4196
diff
changeset
|
39 $(HG_OCTAVE_DIST_ENV_FLAGS) ../configure --prefix=$(ROOT_PREFIX) && \ |
4192
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
40 $(HG_OCTAVE_DIST_ENV_FLAGS) make -j '$(JOBS)' all && \ |
4321
8ec05e08aa22
hg-octave-dist: Also install native Octave
John W. Eaton <jwe@octave.org>
parents:
4196
diff
changeset
|
41 $(HG_OCTAVE_DIST_ENV_FLAGS) make -j '$(JOBS)' install && \ |
4192
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
42 $(HG_OCTAVE_DIST_ENV_FLAGS) make -j '$(JOBS)' dist && \ |
4540
2a8b5cf2085c
allow stable-octave to build from hg
John W. Eaton <jwe@octave.org>
parents:
4321
diff
changeset
|
43 mv '$($(OCTAVE_TARGET)_FILE)' '$(PKG_DIR)' |
4192
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
44 |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
45 .PHONY: update-hg-octave-repo |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
46 update-hg-octave-repo: |
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
47 if [ -d octave-hg-repo ]; then \ |
4540
2a8b5cf2085c
allow stable-octave to build from hg
John W. Eaton <jwe@octave.org>
parents:
4321
diff
changeset
|
48 cd octave-hg-repo \ |
2a8b5cf2085c
allow stable-octave to build from hg
John W. Eaton <jwe@octave.org>
parents:
4321
diff
changeset
|
49 && hg pull && hg update $(hg-octave-branch); \ |
4192
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
50 else \ |
4647
7eebfda7daa1
modify for new octave mercurial location (Bug #53555)
John Donoghue
parents:
4540
diff
changeset
|
51 hg clone https://hg.savannah.gnu.org/hgweb/octave octave-hg-repo \ |
4540
2a8b5cf2085c
allow stable-octave to build from hg
John W. Eaton <jwe@octave.org>
parents:
4321
diff
changeset
|
52 && cd octave-hg-repo \ |
2a8b5cf2085c
allow stable-octave to build from hg
John W. Eaton <jwe@octave.org>
parents:
4321
diff
changeset
|
53 && hg pull && hg update $(hg-octave-branch); \ |
4192
438a4bfdc887
new rules for creating a tarball from Octave's hg sources
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
54 fi |