diff src/ocaml-core.mk @ 3031:951da75fd09c

improve handling of cross tool prefix
author John W. Eaton <jwe@octave.org>
date Sun, 09 Jun 2013 09:48:08 -0400
parents b6c7244a2f66
children 5ef49fb3299d
line wrap: on
line diff
--- a/src/ocaml-core.mk	Sat Jun 08 20:53:29 2013 -0400
+++ b/src/ocaml-core.mk	Sun Jun 09 09:48:08 2013 -0400
@@ -113,16 +113,16 @@
 	$(MAKE) -C '$(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 ; do \
-	  cp -f $(HOST_BINDIR)/$$f $(BUILD_TOOLS_PREFIX)/bin/$(TARGET)-$$f; \
+	  cp -f $(HOST_BINDIR)/$$f $(BUILD_TOOLS_PREFIX)/bin/$(MXE_TOOL_PREFIX)$$f; \
 	done
 
 	# test ocamlopt
 	cp '$(2).ml' '$(1)/test.ml'
-	cd '$(1)' && '$(TARGET)-ocamlopt' test.ml
+	cd '$(1)' && '$(MXE_TOOL_PREFIX)ocamlopt' test.ml
 	# test ocamlbuild
 	mkdir '$(1)/tmp' && cp '$(2).ml' '$(1)/tmp/test.ml'
-	cd '$(1)/tmp' && $(TARGET)-ocamlbuild test.native
+	cd '$(1)/tmp' && $(MXE_TOOL_PREFIX)ocamlbuild test.native
 	# test
 	cp '$(2).ml' '$(1)/test.ml'
-	cd '$(1)' && '$(TARGET)-ocamlopt' test.ml
+	cd '$(1)' && '$(MXE_TOOL_PREFIX)ocamlopt' test.ml
 endef