summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2012-12-05 07:18:54 (GMT)
committerTony Theodore <tonyt@logyst.com>2012-12-05 07:18:54 (GMT)
commit7337ea85eebbba1bb34851fc7cefeaf47a98a003 (patch)
tree414e1c3cf8b97fe49538cfbf0adf7364016e9744 /src
parent8daf0f40955bd2f46bff9ab7e9b0f468d66fa97a (diff)
downloadmxe-7337ea85eebbba1bb34851fc7cefeaf47a98a003.zip
mxe-7337ea85eebbba1bb34851fc7cefeaf47a98a003.tar.gz
mxe-7337ea85eebbba1bb34851fc7cefeaf47a98a003.tar.bz2
run make cleanup-style
Diffstat (limited to 'src')
-rw-r--r--src/armadillo-test.cpp24
-rw-r--r--src/json-c-test.c2
-rw-r--r--src/json-c.mk2
-rw-r--r--src/ocaml-core.mk218
-rwxr-xr-xsrc/ocaml-flexdll-test.c88
-rw-r--r--src/ocaml-flexdll.mk62
-rw-r--r--src/ocaml-native.mk58
7 files changed, 227 insertions, 227 deletions
diff --git a/src/armadillo-test.cpp b/src/armadillo-test.cpp
index da32512..3abff94 100644
--- a/src/armadillo-test.cpp
+++ b/src/armadillo-test.cpp
@@ -9,16 +9,16 @@ using namespace arma;
int main()
{
- mat A = randu<mat>(50,50);
- mat B = trans(A)*A; // generate a symmetric matrix
-
- vec eigval;
- mat eigvec;
-
- // use standard algorithm by default
- eig_sym(eigval, eigvec, B);
-
- // use divide & conquer algorithm
- eig_sym(eigval, eigvec, B, "dc");
- return 0;
+ mat A = randu<mat>(50,50);
+ mat B = trans(A)*A; // generate a symmetric matrix
+
+ vec eigval;
+ mat eigvec;
+
+ // use standard algorithm by default
+ eig_sym(eigval, eigvec, B);
+
+ // use divide & conquer algorithm
+ eig_sym(eigval, eigvec, B, "dc");
+ return 0;
}
diff --git a/src/json-c-test.c b/src/json-c-test.c
index 676d6be..cb5a3c9 100644
--- a/src/json-c-test.c
+++ b/src/json-c-test.c
@@ -4,7 +4,7 @@
*/
#include <json/json.h>
-#include <stdio.h>
+#include <stdio.h>
int main(int argc, char *argv[])
{
diff --git a/src/json-c.mk b/src/json-c.mk
index 5e13fe9..4cfefd2 100644
--- a/src/json-c.mk
+++ b/src/json-c.mk
@@ -24,7 +24,7 @@ define $(PKG)_BUILD
--disable-shared
CFLAGS=-Wno-error
$(MAKE) -C '$(1)' -j '$(JOBS)' install
-
+
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-json-c.exe' \
diff --git a/src/ocaml-core.mk b/src/ocaml-core.mk
index 6683e60..6e0ea8d 100644
--- a/src/ocaml-core.mk
+++ b/src/ocaml-core.mk
@@ -2,127 +2,127 @@
# See doc/index.html for further information.
# zlib
-PKG := ocaml-core
-$(PKG)_IGNORE :=
+PKG := ocaml-core
+$(PKG)_IGNORE :=
$(PKG)_CHECKSUM := $(ocaml-native_CHECKSUM)
-$(PKG)_SUBDIR := $(ocaml-native_SUBDIR)
-$(PKG)_FILE := $(ocaml-native_FILE)
-$(PKG)_URL := $(ocaml-native_URL)
-$(PKG)_DEPS := gcc bfd ocaml-flexdll ocaml-native
+$(PKG)_SUBDIR := $(ocaml-native_SUBDIR)
+$(PKG)_FILE := $(ocaml-native_FILE)
+$(PKG)_URL := $(ocaml-native_URL)
+$(PKG)_DEPS := gcc bfd ocaml-flexdll ocaml-native
define $(PKG)_UPDATE
- $(call ocaml-native_UPDATE)
+ $(call ocaml-native_UPDATE)
endef
OTHER_LIBS := win32unix str num dynlink bigarray systhreads win32graph
define $(PKG)_BUILD
- # Build native ocamlrun and ocamlc which contain the
- # filename-win32-dirsep patch.
- #
- # Note that we must build a 32 bit compiler, even on 64 bit build
- # architectures, because this compiler will try to do strength
- # reduction optimizations using its internal int type, and that must
- # match Windows' int type. (That's what -cc and -host are for).
- cd '$(1)' && ./configure \
- -prefix '$(PREFIX)/$(TARGET)' \
- -bindir '$(PREFIX)/$(TARGET)/bin' \
- -libdir '$(PREFIX)/$(TARGET)/lib/ocaml' \
- -no-tk \
- -cc "gcc -m32" \
- -no-shared-libs \
- -host '$(TARGET)' \
- -x11lib /usr/lib \
- -verbose
- $(MAKE) -C '$(1)' core
- # Now move the working ocamlrun, ocamlc into the boot/ directory,
- # overwriting the binary versions which ship with the compiler with
- # ones that contain the filename-win32-dirsep patch.
- $(MAKE) -C '$(1)' coreboot
- # second time, otherwise Segfault in some cases (depending on the runing system?)
- $(MAKE) -C '$(1)' coreboot
- $(MAKE) -C '$(1)' all
- # install ocamldoc and camlp4 (non cross versions)
- $(MAKE) -C '$(1)/ocamldoc' install
- cd '$(1)' && BINDIR=$(PREFIX)/$(TARGET)/bin \
- LIBDIR=$(PREFIX)/$(TARGET)/lib/ocaml \
- PREFIX=$(PREFIX)/$(TARGET) \
- ./build/partial-install.sh
+ # Build native ocamlrun and ocamlc which contain the
+ # filename-win32-dirsep patch.
+ #
+ # Note that we must build a 32 bit compiler, even on 64 bit build
+ # architectures, because this compiler will try to do strength
+ # reduction optimizations using its internal int type, and that must
+ # match Windows' int type. (That's what -cc and -host are for).
+ cd '$(1)' && ./configure \
+ -prefix '$(PREFIX)/$(TARGET)' \
+ -bindir '$(PREFIX)/$(TARGET)/bin' \
+ -libdir '$(PREFIX)/$(TARGET)/lib/ocaml' \
+ -no-tk \
+ -cc "gcc -m32" \
+ -no-shared-libs \
+ -host '$(TARGET)' \
+ -x11lib /usr/lib \
+ -verbose
+ $(MAKE) -C '$(1)' core
+ # Now move the working ocamlrun, ocamlc into the boot/ directory,
+ # overwriting the binary versions which ship with the compiler with
+ # ones that contain the filename-win32-dirsep patch.
+ $(MAKE) -C '$(1)' coreboot
+ # second time, otherwise Segfault in some cases (depending on the runing system?)
+ $(MAKE) -C '$(1)' coreboot
+ $(MAKE) -C '$(1)' all
+ # install ocamldoc and camlp4 (non cross versions)
+ $(MAKE) -C '$(1)/ocamldoc' 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.
- $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" \
- $(1)/hardcode_mingw_include.patch
- cd '$(1)' && patch -p2 < hardcode_mingw_include.patch
+ ####### patch mingw include
+ # Now patch utils/clflags.ml to hardcode mingw-specific include.
+ $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" \
+ $(1)/hardcode_mingw_include.patch
+ cd '$(1)' && patch -p2 < hardcode_mingw_include.patch
- ####### prepare cross build
- # Replace the compiler configuration (config/{s.h,m.h,Makefile})
- # with ones as they would be on a 32 bit Windows system.
- cp -f '$(1)/config/m-nt.h' '$(1)/config/m.h'
- cp -f $(1)/config/s-nt.h $(1)/config/s.h
- # config/Makefile is a custom one which we supply.
- rm -f $(1)/config/Makefile
- $(SED) \
- -e "s,@prefix@,$(PREFIX)/$(TARGET),g" \
- -e "s,@toolpref@,$(TARGET),g" \
- -e "s,@otherlibraries@,$(OTHER_LIBS),g" \
- < $(1)/Makefile-mingw.in > $(1)/config/Makefile
- $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/Makefile.shared
- # We're going to build in otherlibs/win32unix and otherlibs/win32graph
- # directories, but since they would normally only be built under
- # Windows, they only have the Makefile.nt files. Just symlink
- # Makefile -> Makefile.nt for these cases.
- $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/win32unix/Makefile.nt
- $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/win32graph/Makefile.nt
- $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/systhreads/Makefile.nt
- for d in $(1)/otherlibs/win32unix \
- $(1)/otherlibs/win32graph \
- $(1)/otherlibs/bigarray \
- $(1)/otherlibs/systhreads; do \
- ln -sf Makefile.nt $$d/Makefile; \
- done
- # Now clean the temporary files from the previous build. This
- # will also cause asmcomp/arch.ml (etc) to be linked to the 32 bit
- # i386 versions, essentially causing ocamlopt to use the Win/i386 code
- # generator.
- $(MAKE) -C '$(1)' partialclean
- # We need to remove any .o object for make sure they are
- # recompiled later..
- cd $(1) && rm byterun/*.o
+ ####### prepare cross build
+ # Replace the compiler configuration (config/{s.h,m.h,Makefile})
+ # with ones as they would be on a 32 bit Windows system.
+ cp -f '$(1)/config/m-nt.h' '$(1)/config/m.h'
+ cp -f $(1)/config/s-nt.h $(1)/config/s.h
+ # config/Makefile is a custom one which we supply.
+ rm -f $(1)/config/Makefile
+ $(SED) \
+ -e "s,@prefix@,$(PREFIX)/$(TARGET),g" \
+ -e "s,@toolpref@,$(TARGET),g" \
+ -e "s,@otherlibraries@,$(OTHER_LIBS),g" \
+ < $(1)/Makefile-mingw.in > $(1)/config/Makefile
+ $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/Makefile.shared
+ # We're going to build in otherlibs/win32unix and otherlibs/win32graph
+ # directories, but since they would normally only be built under
+ # Windows, they only have the Makefile.nt files. Just symlink
+ # Makefile -> Makefile.nt for these cases.
+ $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/win32unix/Makefile.nt
+ $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/win32graph/Makefile.nt
+ $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/systhreads/Makefile.nt
+ for d in $(1)/otherlibs/win32unix \
+ $(1)/otherlibs/win32graph \
+ $(1)/otherlibs/bigarray \
+ $(1)/otherlibs/systhreads; do \
+ ln -sf Makefile.nt $$d/Makefile; \
+ done
+ # Now clean the temporary files from the previous build. This
+ # will also cause asmcomp/arch.ml (etc) to be linked to the 32 bit
+ # i386 versions, essentially causing ocamlopt to use the Win/i386 code
+ # generator.
+ $(MAKE) -C '$(1)' partialclean
+ # We need to remove any .o object for make sure they are
+ # recompiled later..
+ cd $(1) && rm byterun/*.o
- ####### build mingw ocaml
- # Just rebuild some small bits that we need for the following
- # 'make opt' to work. Note that 'make all' fails here.
- $(MAKE) -C '$(1)/byterun' libcamlrun.a
- $(MAKE) -C '$(1)' ocaml ocamlc
- $(MAKE) -C '$(1)/stdlib'
- $(MAKE) -C '$(1)/tools' ocamlmklib
- # Build ocamlopt
- $(MAKE) -C '$(1)' opt
- # Now build otherlibs for ocamlopt
- cd '$(1)' && \
- for i in $(OTHER_LIBS); do \
- $(MAKE) -C otherlibs/$$i clean; \
- $(MAKE) -C otherlibs/$$i all; \
- $(MAKE) -C otherlibs/$$i allopt; \
- done
+ ####### build mingw ocaml
+ # Just rebuild some small bits that we need for the following
+ # 'make opt' to work. Note that 'make all' fails here.
+ $(MAKE) -C '$(1)/byterun' libcamlrun.a
+ $(MAKE) -C '$(1)' ocaml ocamlc
+ $(MAKE) -C '$(1)/stdlib'
+ $(MAKE) -C '$(1)/tools' ocamlmklib
+ # Build ocamlopt
+ $(MAKE) -C '$(1)' opt
+ # Now build otherlibs for ocamlopt
+ cd '$(1)' && \
+ for i in $(OTHER_LIBS); do \
+ $(MAKE) -C otherlibs/$$i clean; \
+ $(MAKE) -C otherlibs/$$i all; \
+ $(MAKE) -C otherlibs/$$i allopt; \
+ done
- ####### installation
- $(MAKE) -C '$(1)' install
- $(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 $(PREFIX)/$(TARGET)/bin/$$f $(PREFIX)/bin/$(TARGET)-$$f; \
- done
+ ####### installation
+ $(MAKE) -C '$(1)' install
+ $(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 $(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
- mkdir '$(1)/tmp' && cp '$(2).ml' '$(1)/tmp/test.ml'
- cd '$(1)/tmp' && $(TARGET)-ocamlbuild test.native
- # test
- cp '$(2).ml' '$(1)/test.ml'
- cd '$(1)' && '$(TARGET)-ocamlopt' test.ml
+ # test ocamlopt
+ cp '$(2).ml' '$(1)/test.ml'
+ cd '$(1)' && '$(TARGET)-ocamlopt' test.ml
+ # test ocamlbuild
+ mkdir '$(1)/tmp' && cp '$(2).ml' '$(1)/tmp/test.ml'
+ cd '$(1)/tmp' && $(TARGET)-ocamlbuild test.native
+ # test
+ cp '$(2).ml' '$(1)/test.ml'
+ cd '$(1)' && '$(TARGET)-ocamlopt' test.ml
endef
diff --git a/src/ocaml-flexdll-test.c b/src/ocaml-flexdll-test.c
index 3e231ca..79ed21a 100755
--- a/src/ocaml-flexdll-test.c
+++ b/src/ocaml-flexdll-test.c
@@ -1,44 +1,44 @@
-/*****************************************************************
- FlexDLL
- Alain Frisch
-
- Copyright 2007 Institut National de Recherche en Informatique et
- en Automatique.
-
-******************************************************************/
-
-/* An example (main program) */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include "flexdll.h"
-
-typedef void torun();
-
-void api(char *msg){ printf("API: %s\n", msg); }
-
-int main(int argc, char **argv)
-{
- void *sym;
- void *handle;
- int i;
- torun *torun;
-
- printf("INIT\n"); fflush(stdout);
- flexdll_dump_exports(NULL);
- printf("OK\n"); fflush(stdout);
- for (i = 1; i < argc; i++) {
- printf("** Loading %s\n", argv[i]);
- handle = flexdll_dlopen(argv[i], FLEXDLL_RTLD_GLOBAL);
- if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); }
- printf("** handle = %p\n", handle);
- flexdll_dump_exports(handle);
- flexdll_dump_relocations(handle);
-
- if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); }
-
- torun = flexdll_dlsym(handle, "torun");
- if (torun) torun();
- }
- exit(0);
-}
+/*****************************************************************
+ FlexDLL
+ Alain Frisch
+
+ Copyright 2007 Institut National de Recherche en Informatique et
+ en Automatique.
+
+******************************************************************/
+
+/* An example (main program) */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "flexdll.h"
+
+typedef void torun();
+
+void api(char *msg){ printf("API: %s\n", msg); }
+
+int main(int argc, char **argv)
+{
+ void *sym;
+ void *handle;
+ int i;
+ torun *torun;
+
+ printf("INIT\n"); fflush(stdout);
+ flexdll_dump_exports(NULL);
+ printf("OK\n"); fflush(stdout);
+ for (i = 1; i < argc; i++) {
+ printf("** Loading %s\n", argv[i]);
+ handle = flexdll_dlopen(argv[i], FLEXDLL_RTLD_GLOBAL);
+ if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); }
+ printf("** handle = %p\n", handle);
+ flexdll_dump_exports(handle);
+ flexdll_dump_relocations(handle);
+
+ if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); }
+
+ torun = flexdll_dlsym(handle, "torun");
+ if (torun) torun();
+ }
+ exit(0);
+}
diff --git a/src/ocaml-flexdll.mk b/src/ocaml-flexdll.mk
index 518d654..762e738 100644
--- a/src/ocaml-flexdll.mk
+++ b/src/ocaml-flexdll.mk
@@ -2,42 +2,42 @@
# See doc/index.html for further information.
# zlib
-PKG := ocaml-flexdll
-$(PKG)_IGNORE :=
+PKG := ocaml-flexdll
+$(PKG)_IGNORE :=
$(PKG)_CHECKSUM := 585f066f890c7dca95be7541b4647128335f7df9
-$(PKG)_SUBDIR := flexdll
-$(PKG)_FILE := flexdll-$($(PKG)_VERSION).tar.gz
-$(PKG)_URL := http://alain.frisch.fr/flexdll/$($(PKG)_FILE)
-$(PKG)_DEPS := gcc ocaml-native
+$(PKG)_SUBDIR := flexdll
+$(PKG)_FILE := flexdll-$($(PKG)_VERSION).tar.gz
+$(PKG)_URL := http://alain.frisch.fr/flexdll/$($(PKG)_FILE)
+$(PKG)_DEPS := gcc ocaml-native
define $(PKG)_UPDATE
- wget -q -O- 'http://alain.frisch.fr/flexdll/' | \
- $(SED) -n 's,.*flexdll-\([0-9][^>]*\)\.tar.gz.*,\1,ip' | \
- head -1
+ wget -q -O- 'http://alain.frisch.fr/flexdll/' | \
+ $(SED) -n 's,.*flexdll-\([0-9][^>]*\)\.tar.gz.*,\1,ip' | \
+ head -1
endef
define $(PKG)_BUILD
- $(MAKE) -C '$(1)' -j '$(JOBS)' \
- CHAINS=mingw \
- MINGW_PREFIX=$(TARGET) \
- OCAMLOPT=$(PREFIX)/$(TARGET)/bin/ocaml-native/ocamlopt \
- all
- mkdir -p '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll'
- cd '$(1)' && mv flexlink.exe flexlink
- cd '$(1)' && strip --remove-section=.comment --remove-section=.note flexlink
- cd '$(1)' && $(INSTALL) -m 0755 flexdll.h '$(PREFIX)/$(TARGET)/include'
- cd '$(1)' && $(INSTALL) -m 0755 flexlink flexdll_mingw.o \
- flexdll_initer_mingw.o \
- '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll'
- # create flexdll scripts
- cd '$(PREFIX)/bin' && ln -sf '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll/flexlink'
- (echo '#!/bin/sh'; \
- echo 'exec flexlink -I $(PREFIX)/$(TARGET)/lib -chain mingw -nocygpath "$$@"') \
- > '$(PREFIX)/bin/$(TARGET)-flexlink'
- chmod 0755 '$(PREFIX)/bin/$(TARGET)-flexlink'
+ $(MAKE) -C '$(1)' -j '$(JOBS)' \
+ CHAINS=mingw \
+ MINGW_PREFIX=$(TARGET) \
+ OCAMLOPT=$(PREFIX)/$(TARGET)/bin/ocaml-native/ocamlopt \
+ all
+ mkdir -p '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll'
+ cd '$(1)' && mv flexlink.exe flexlink
+ cd '$(1)' && strip --remove-section=.comment --remove-section=.note flexlink
+ cd '$(1)' && $(INSTALL) -m 0755 flexdll.h '$(PREFIX)/$(TARGET)/include'
+ cd '$(1)' && $(INSTALL) -m 0755 flexlink flexdll_mingw.o \
+ flexdll_initer_mingw.o \
+ '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll'
+ # create flexdll scripts
+ cd '$(PREFIX)/bin' && ln -sf '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll/flexlink'
+ (echo '#!/bin/sh'; \
+ echo 'exec flexlink -I $(PREFIX)/$(TARGET)/lib -chain mingw -nocygpath "$$@"') \
+ > '$(PREFIX)/bin/$(TARGET)-flexlink'
+ chmod 0755 '$(PREFIX)/bin/$(TARGET)-flexlink'
- echo "testing flexlink..."
- $(MAKE) -C '$(1)/test' -j '$(JOBS)' dump.exe plug1.dll plug2.dll CC=$(TARGET)-gcc O=o FLEXLINK=$(TARGET)-flexlink
- #works if wine is installed :
- #cd '$(1)/test' && ./dump.exe plug1.dll plug2.dll
+ echo "testing flexlink..."
+ $(MAKE) -C '$(1)/test' -j '$(JOBS)' dump.exe plug1.dll plug2.dll CC=$(TARGET)-gcc O=o FLEXLINK=$(TARGET)-flexlink
+ #works if wine is installed :
+ #cd '$(1)/test' && ./dump.exe plug1.dll plug2.dll
endef
diff --git a/src/ocaml-native.mk b/src/ocaml-native.mk
index 6cfa58c..fbe6296 100644
--- a/src/ocaml-native.mk
+++ b/src/ocaml-native.mk
@@ -2,39 +2,39 @@
# See doc/index.html for further information.
# zlib
-PKG := ocaml-native
-$(PKG)_IGNORE :=
+PKG := ocaml-native
+$(PKG)_IGNORE :=
$(PKG)_CHECKSUM := 9653e76dd14f0fbb750d7b438415890ab9fe2f4e
-$(PKG)_SUBDIR := ocaml-$($(PKG)_VERSION)
-$(PKG)_FILE := ocaml-$($(PKG)_VERSION).tar.gz
-$(PKG)_URL := http://caml.inria.fr/pub/distrib/ocaml-4.00/$($(PKG)_FILE)
-$(PKG)_DEPS := gcc
+$(PKG)_SUBDIR := ocaml-$($(PKG)_VERSION)
+$(PKG)_FILE := ocaml-$($(PKG)_VERSION).tar.gz
+$(PKG)_URL := http://caml.inria.fr/pub/distrib/ocaml-4.00/$($(PKG)_FILE)
+$(PKG)_DEPS := gcc
define $(PKG)_UPDATE
- wget -q -O- 'http://caml.inria.fr/pub/distrib/ocaml-3.12' | \
- $(SED) -n 's,.*ocaml-\([0-9][^>]*\)\.tar.*,\1,ip' | \
- tail -1
+ wget -q -O- 'http://caml.inria.fr/pub/distrib/ocaml-3.12' | \
+ $(SED) -n 's,.*ocaml-\([0-9][^>]*\)\.tar.*,\1,ip' | \
+ tail -1
endef
define $(PKG)_BUILD
- # patched ocaml source to get ocamlbuild use $(TARGET)-ocamlc, $(TARGET)-ocamlfind, ...
- cd '$(1)' && ./configure \
- -prefix '$(PREFIX)/$(TARGET)' \
- -bindir '$(PREFIX)/$(TARGET)/bin/ocaml-native' \
- -libdir '$(PREFIX)/$(TARGET)/lib/ocaml-native' \
- -no-tk \
- -no-shared-libs \
- -verbose
- $(MAKE) -C '$(1)' -j 1 world opt
- $(SED) -i "s,@target@,$(TARGET),g" $(1)/ocamlbuild/options.ml
- $(SED) -i "s,@target@,$(TARGET),g" $(1)/ocamlbuild/findlib.ml
- $(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
+ # patched ocaml source to get ocamlbuild use $(TARGET)-ocamlc, $(TARGET)-ocamlfind, ...
+ cd '$(1)' && ./configure \
+ -prefix '$(PREFIX)/$(TARGET)' \
+ -bindir '$(PREFIX)/$(TARGET)/bin/ocaml-native' \
+ -libdir '$(PREFIX)/$(TARGET)/lib/ocaml-native' \
+ -no-tk \
+ -no-shared-libs \
+ -verbose
+ $(MAKE) -C '$(1)' -j 1 world opt
+ $(SED) -i "s,@target@,$(TARGET),g" $(1)/ocamlbuild/options.ml
+ $(SED) -i "s,@target@,$(TARGET),g" $(1)/ocamlbuild/findlib.ml
+ $(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
endef