summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwilliam3 <r.3@libertysurf.fr>2013-04-13 14:00:02 (GMT)
committerwilliam3 <r.3@libertysurf.fr>2013-04-13 14:00:45 (GMT)
commitcda6fd5211926899d013066c7c28c817f2961f42 (patch)
tree2ec7be3eadf95524f7e7a8471451ecf169fdc34a /src
parent7756456a8861d89089d249f0634fcb85b06aeb19 (diff)
downloadmxe-cda6fd5211926899d013066c7c28c817f2961f42.zip
mxe-cda6fd5211926899d013066c7c28c817f2961f42.tar.gz
mxe-cda6fd5211926899d013066c7c28c817f2961f42.tar.bz2
reorganise native and cross tools between ocaml-native and ocaml-core
Diffstat (limited to 'src')
-rw-r--r--src/ocaml-core.mk10
-rw-r--r--src/ocaml-native.mk20
2 files changed, 15 insertions, 15 deletions
diff --git a/src/ocaml-core.mk b/src/ocaml-core.mk
index 5ceba80..2ef9bb6 100644
--- a/src/ocaml-core.mk
+++ b/src/ocaml-core.mk
@@ -43,11 +43,6 @@ define $(PKG)_BUILD
$(MAKE) -C '$(1)' -j 1 coreboot
$(MAKE) -C '$(1)' -j 1 all
# install ocamldoc and camlp4 (non cross versions)
- $(MAKE) -C '$(1)/ocamldoc' -j 1 install
- cd '$(1)' && BINDIR=$(PREFIX)/$(TARGET)/bin \
- LIBDIR=$(PREFIX)/$(TARGET)/lib/ocaml \
- PREFIX=$(PREFIX)/$(TARGET) \
- ./build/partial-install.sh
####### patch mingw include
# Now patch utils/clflags.ml to hardcode mingw-specific include.
@@ -112,15 +107,14 @@ define $(PKG)_BUILD
$(MAKE) -C '$(1)' -j 1 installopt
# Rename all the binaries to target-binary
for f in ocamlc ocamlcp ocamlrun ocamldep ocamlmklib ocamlmktop ocamlopt \
- ocamlprof camlp4prof camlp4boot camlp4 camlp4oof camlp4of camlp4o \
- camlp4rf camlp4r camlp4orf ocamldoc ocamllex ocamlyacc; do \
+ ocamlprof; do \
cp -f $(PREFIX)/$(TARGET)/bin/$$f $(PREFIX)/bin/$(TARGET)-$$f; \
done
# test ocamlopt
cp '$(2).ml' '$(1)/test.ml'
cd '$(1)' && '$(TARGET)-ocamlopt' test.ml
- # test ocamlbuild
+ # test ocamlbuild from package ocaml-native, now that ocamlopt works
mkdir '$(1)/tmp' && cp '$(2).ml' '$(1)/tmp/test.ml'
cd '$(1)/tmp' && $(TARGET)-ocamlbuild test.native
endef
diff --git a/src/ocaml-native.mk b/src/ocaml-native.mk
index 7bee89d..e8f4fa8 100644
--- a/src/ocaml-native.mk
+++ b/src/ocaml-native.mk
@@ -16,7 +16,13 @@ define $(PKG)_UPDATE
endef
define $(PKG)_BUILD
- # patched ocaml source to get ocamlbuild use $(TARGET)-ocamlc, $(TARGET)-ocamlfind, ...
+ # the following script would require ocamlbuild with an option '-ocamlfind'
+ # to work:
+ #(echo '#!/bin/sh'; \
+ # echo 'exec $(PREFIX)/bin/ocamlbuild -use-ocamlfind -ocamlfind $(TARGET)-ocamlfind "$$@"') \
+ # > '$(PREFIX)/bin/$(TARGET)-ocamlbuild'
+ # chmod 0755 '$(PREFIX)/bin/$(TARGET)-ocamlbuild'
+ # As it is not the case, we patche ocaml source to get ocamlbuild use $(TARGET)-ocamlc, $(TARGET)-ocamlfind, ...
cd '$(1)' && ./configure \
-prefix '$(PREFIX)/$(TARGET)' \
-bindir '$(PREFIX)/$(TARGET)/bin/ocaml-native' \
@@ -30,10 +36,10 @@ define $(PKG)_BUILD
$(MAKE) -C '$(1)' -j '$(JOBS)' ocamlbuild.native
cp -f '$(1)/_build/ocamlbuild/ocamlbuild.native' $(PREFIX)/bin/$(TARGET)-ocamlbuild
$(MAKE) -C '$(1)' install
- # the following script requires ocamlbuild with option -ocamlfind to work
- #(echo '#!/bin/sh'; \
- # echo 'exec $(PREFIX)/bin/ocamlbuild -use-ocamlfind -ocamlfind $(TARGET)-ocamlfind "$$@"') \
- # > '$(PREFIX)/bin/$(TARGET)-ocamlbuild'
- #chmod 0755 '$(PREFIX)/bin/$(TARGET)-ocamlbuild'
- # test will be done once cross ocamlopt is built
+ # Rename all the binaries to target-binary
+ for f in camlp4 camlp4oof camlp4of camlp4o camlp4rf camlp4r camlp4orf \
+ ocamldoc ocamllex ocamlyacc; do \
+ cp -f $(PREFIX)/$(TARGET)/bin/ocaml-native/$$f $(PREFIX)/bin/$(TARGET)-$$f; \
+ done
+ # test will be done once cross ocamlopt is built in package ocaml-core
endef