Mercurial > mxe-octave
annotate src/ocaml-native.mk @ 3012:100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
BUILD_TOOLS_PREFIX variables in top-level Makefile.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 02 Jun 2013 10:31:04 -0400 |
parents | efb8519157c2 |
children | b6c7244a2f66 |
rev | line source |
---|---|
2834 | 1 # This file is part of mingw-cross-env. |
2 # See doc/index.html for further information. | |
3 | |
4 # zlib | |
5 PKG := ocaml-native | |
6 $(PKG)_IGNORE := | |
7 $(PKG)_CHECKSUM := 9653e76dd14f0fbb750d7b438415890ab9fe2f4e | |
8 $(PKG)_SUBDIR := ocaml-$($(PKG)_VERSION) | |
9 $(PKG)_FILE := ocaml-$($(PKG)_VERSION).tar.gz | |
10 $(PKG)_URL := http://caml.inria.fr/pub/distrib/ocaml-4.00/$($(PKG)_FILE) | |
11 $(PKG)_DEPS := gcc | |
12 | |
13 define $(PKG)_UPDATE | |
14 wget -q -O- 'http://caml.inria.fr/pub/distrib/ocaml-3.12' | \ | |
15 $(SED) -n 's,.*ocaml-\([0-9][^>]*\)\.tar.*,\1,ip' | \ | |
16 tail -1 | |
17 endef | |
18 | |
19 define $(PKG)_BUILD | |
20 # patched ocaml source to get ocamlbuild use $(TARGET)-ocamlc, $(TARGET)-ocamlfind, ... | |
21 cd '$(1)' && ./configure \ | |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2837
diff
changeset
|
22 -prefix '$(HOST_PREFIX)' \ |
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2837
diff
changeset
|
23 -bindir '$(HOST_PREFIX)/bin/ocaml-native' \ |
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2837
diff
changeset
|
24 -libdir '$(HOST_PREFIX)/lib/ocaml-native' \ |
2834 | 25 -no-tk \ |
26 -no-shared-libs \ | |
27 -verbose | |
2837
efb8519157c2
package ocaml-native: disable parallel building due to failures
Mark Brand <mabrand@mabrand.nl>
parents:
2834
diff
changeset
|
28 $(MAKE) -C '$(1)' -j 1 world opt |
2834 | 29 $(SED) -i "s,@target@,$(TARGET),g" $(1)/ocamlbuild/options.ml |
30 $(SED) -i "s,@target@,$(TARGET),g" $(1)/ocamlbuild/findlib.ml | |
31 $(MAKE) -C '$(1)' -j '$(JOBS)' ocamlbuild.native | |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2837
diff
changeset
|
32 cp -f '$(1)/_build/ocamlbuild/ocamlbuild.native' $(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-ocamlbuild |
2834 | 33 $(MAKE) -C '$(1)' install |
34 # the following script requires ocamlbuild with option -ocamlfind to work | |
35 #(echo '#!/bin/sh'; \ | |
3012
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2837
diff
changeset
|
36 # echo 'exec $(BUILD_TOOLS_PREFIX)/bin/ocamlbuild -use-ocamlfind -ocamlfind $(TARGET)-ocamlfind "$$@"') \ |
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2837
diff
changeset
|
37 # > '$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-ocamlbuild' |
100e618349f7
Improve handling of prefix directories by defining HOST_PREFIX and
John W. Eaton <jwe@octave.org>
parents:
2837
diff
changeset
|
38 #chmod 0755 '$(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-ocamlbuild' |
2834 | 39 # test will be done once cross ocamlopt is built |
40 endef |