History

run make cleanup-style

Tony Theodore committed 13 years ago

Commit 7337ea81 parent 8daf0f48 files · +228 −228Browse files

Unified · Split

8 files
  1. index.html +1 −1
  2. src/armadillo-test.cpp +12 −12
  3. src/json-c-test.c +1 −1
  4. src/json-c.mk +1 −1
  5. src/ocaml-core.mk +109 −109
  6. src/ocaml-flexdll-test.c +44 −44
  7. src/ocaml-flexdll.mk +31 −31
  8. src/ocaml-native.mk +29 −29
index.html+1−1
@@ -1512,7 +1512,7 @@ USE_OSGPLUGIN(<plugin2>) · 1511 unmodified lines
1512 <td id="librsvg-package">librsvg</td>1512 <td id="librsvg-package">librsvg</td>
1513 <td id="librsvg-version">2.36.4</td>1513 <td id="librsvg-version">2.36.4</td>
1514 <td id="librsvg-website"><a href="http://librsvg.sourceforge.net/">librsvg</a></td>1514 <td id="librsvg-website"><a href="http://librsvg.sourceforge.net/">librsvg</a></td>
1515 </tr>1515 </tr>
1516 <tr>1516 <tr>
1517 <td id="librtmp-package">librtmp</td>1517 <td id="librtmp-package">librtmp</td>
1518 <td id="librtmp-version">2.4</td>1518 <td id="librtmp-version">2.4</td>
src/armadillo-test.cpp+12−12
@@ -9,16 +9,16 @@ using namespace arma; · 8 unmodified lines
9 9
10int main()10int main()
11{11{
12 mat A = randu<mat>(50,50);12 mat A = randu<mat>(50,50);
13 mat B = trans(A)*A; // generate a symmetric matrix13 mat B = trans(A)*A; // generate a symmetric matrix
14 14
15 vec eigval;15 vec eigval;
16 mat eigvec;16 mat eigvec;
17 17
18 // use standard algorithm by default18 // use standard algorithm by default
19 eig_sym(eigval, eigvec, B);19 eig_sym(eigval, eigvec, B);
20 20
21 // use divide & conquer algorithm21 // use divide & conquer algorithm
22 eig_sym(eigval, eigvec, B, "dc");22 eig_sym(eigval, eigvec, B, "dc");
23 return 0;23 return 0;
24}24}
src/json-c-test.c+1−1
@@ -4,7 +4,7 @@ · 3 unmodified lines
4 */4 */
5 5
6#include <json/json.h>6#include <json/json.h>
7#include <stdio.h> 7#include <stdio.h>
8 8
9int main(int argc, char *argv[])9int main(int argc, char *argv[])
10{10{
src/json-c.mk+1−1
@@ -24,7 +24,7 @@ define $(PKG)_BUILD · 23 unmodified lines
24 --disable-shared24 --disable-shared
25 CFLAGS=-Wno-error25 CFLAGS=-Wno-error
26 $(MAKE) -C '$(1)' -j '$(JOBS)' install26 $(MAKE) -C '$(1)' -j '$(JOBS)' install
27 27
28 '$(TARGET)-gcc' \28 '$(TARGET)-gcc' \
29 -W -Wall -Werror -ansi -pedantic \29 -W -Wall -Werror -ansi -pedantic \
30 '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-json-c.exe' \30 '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-json-c.exe' \
src/ocaml-core.mk+109−109
@@ -2,127 +2,127 @@ · 1 unmodified line
2# See doc/index.html for further information.2# See doc/index.html for further information.
3 3
4# zlib4# zlib
5PKG := ocaml-core5PKG := ocaml-core
6$(PKG)_IGNORE :=6$(PKG)_IGNORE :=
7$(PKG)_CHECKSUM := $(ocaml-native_CHECKSUM)7$(PKG)_CHECKSUM := $(ocaml-native_CHECKSUM)
8$(PKG)_SUBDIR := $(ocaml-native_SUBDIR)8$(PKG)_SUBDIR := $(ocaml-native_SUBDIR)
9$(PKG)_FILE := $(ocaml-native_FILE)9$(PKG)_FILE := $(ocaml-native_FILE)
10$(PKG)_URL := $(ocaml-native_URL)10$(PKG)_URL := $(ocaml-native_URL)
11$(PKG)_DEPS := gcc bfd ocaml-flexdll ocaml-native11$(PKG)_DEPS := gcc bfd ocaml-flexdll ocaml-native
12 12
13define $(PKG)_UPDATE13define $(PKG)_UPDATE
14 $(call ocaml-native_UPDATE)14 $(call ocaml-native_UPDATE)
15endef15endef
16 16
17 17
18OTHER_LIBS := win32unix str num dynlink bigarray systhreads win32graph18OTHER_LIBS := win32unix str num dynlink bigarray systhreads win32graph
19 19
20define $(PKG)_BUILD20define $(PKG)_BUILD
21 # Build native ocamlrun and ocamlc which contain the21 # Build native ocamlrun and ocamlc which contain the
22 # filename-win32-dirsep patch.22 # filename-win32-dirsep patch.
23 #23 #
24 # Note that we must build a 32 bit compiler, even on 64 bit build24 # Note that we must build a 32 bit compiler, even on 64 bit build
25 # architectures, because this compiler will try to do strength25 # architectures, because this compiler will try to do strength
26 # reduction optimizations using its internal int type, and that must26 # reduction optimizations using its internal int type, and that must
27 # match Windows' int type. (That's what -cc and -host are for).27 # match Windows' int type. (That's what -cc and -host are for).
28 cd '$(1)' && ./configure \28 cd '$(1)' && ./configure \
29 -prefix '$(PREFIX)/$(TARGET)' \29 -prefix '$(PREFIX)/$(TARGET)' \
30 -bindir '$(PREFIX)/$(TARGET)/bin' \30 -bindir '$(PREFIX)/$(TARGET)/bin' \
31 -libdir '$(PREFIX)/$(TARGET)/lib/ocaml' \31 -libdir '$(PREFIX)/$(TARGET)/lib/ocaml' \
32 -no-tk \32 -no-tk \
33 -cc "gcc -m32" \33 -cc "gcc -m32" \
34 -no-shared-libs \34 -no-shared-libs \
35 -host '$(TARGET)' \35 -host '$(TARGET)' \
36 -x11lib /usr/lib \36 -x11lib /usr/lib \
37 -verbose37 -verbose
38 $(MAKE) -C '$(1)' core38 $(MAKE) -C '$(1)' core
39 # Now move the working ocamlrun, ocamlc into the boot/ directory,39 # Now move the working ocamlrun, ocamlc into the boot/ directory,
40 # overwriting the binary versions which ship with the compiler with40 # overwriting the binary versions which ship with the compiler with
41 # ones that contain the filename-win32-dirsep patch.41 # ones that contain the filename-win32-dirsep patch.
42 $(MAKE) -C '$(1)' coreboot42 $(MAKE) -C '$(1)' coreboot
43 # second time, otherwise Segfault in some cases (depending on the runing system?)43 # second time, otherwise Segfault in some cases (depending on the runing system?)
44 $(MAKE) -C '$(1)' coreboot44 $(MAKE) -C '$(1)' coreboot
45 $(MAKE) -C '$(1)' all45 $(MAKE) -C '$(1)' all
46 # install ocamldoc and camlp4 (non cross versions)46 # install ocamldoc and camlp4 (non cross versions)
47 $(MAKE) -C '$(1)/ocamldoc' install47 $(MAKE) -C '$(1)/ocamldoc' install
48 cd '$(1)' && BINDIR=$(PREFIX)/$(TARGET)/bin \48 cd '$(1)' && BINDIR=$(PREFIX)/$(TARGET)/bin \
49 LIBDIR=$(PREFIX)/$(TARGET)/lib/ocaml \49 LIBDIR=$(PREFIX)/$(TARGET)/lib/ocaml \
50 PREFIX=$(PREFIX)/$(TARGET) \50 PREFIX=$(PREFIX)/$(TARGET) \
51 ./build/partial-install.sh51 ./build/partial-install.sh
52 52
53 ####### patch mingw include53 ####### patch mingw include
54 # Now patch utils/clflags.ml to hardcode mingw-specific include.54 # Now patch utils/clflags.ml to hardcode mingw-specific include.
55 $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" \55 $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" \
56 $(1)/hardcode_mingw_include.patch56 $(1)/hardcode_mingw_include.patch
57 cd '$(1)' && patch -p2 < hardcode_mingw_include.patch57 cd '$(1)' && patch -p2 < hardcode_mingw_include.patch
58 58
59 ####### prepare cross build59 ####### prepare cross build
60 # Replace the compiler configuration (config/{s.h,m.h,Makefile})60 # Replace the compiler configuration (config/{s.h,m.h,Makefile})
61 # with ones as they would be on a 32 bit Windows system.61 # with ones as they would be on a 32 bit Windows system.
62 cp -f '$(1)/config/m-nt.h' '$(1)/config/m.h'62 cp -f '$(1)/config/m-nt.h' '$(1)/config/m.h'
63 cp -f $(1)/config/s-nt.h $(1)/config/s.h63 cp -f $(1)/config/s-nt.h $(1)/config/s.h
64 # config/Makefile is a custom one which we supply.64 # config/Makefile is a custom one which we supply.
65 rm -f $(1)/config/Makefile65 rm -f $(1)/config/Makefile
66 $(SED) \66 $(SED) \
67 -e "s,@prefix@,$(PREFIX)/$(TARGET),g" \67 -e "s,@prefix@,$(PREFIX)/$(TARGET),g" \
68 -e "s,@toolpref@,$(TARGET),g" \68 -e "s,@toolpref@,$(TARGET),g" \
69 -e "s,@otherlibraries@,$(OTHER_LIBS),g" \69 -e "s,@otherlibraries@,$(OTHER_LIBS),g" \
70 < $(1)/Makefile-mingw.in > $(1)/config/Makefile70 < $(1)/Makefile-mingw.in > $(1)/config/Makefile
71 $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/Makefile.shared71 $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/Makefile.shared
72 # We're going to build in otherlibs/win32unix and otherlibs/win32graph72 # We're going to build in otherlibs/win32unix and otherlibs/win32graph
73 # directories, but since they would normally only be built under73 # directories, but since they would normally only be built under
74 # Windows, they only have the Makefile.nt files. Just symlink74 # Windows, they only have the Makefile.nt files. Just symlink
75 # Makefile -> Makefile.nt for these cases.75 # Makefile -> Makefile.nt for these cases.
76 $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/win32unix/Makefile.nt76 $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/win32unix/Makefile.nt
77 $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/win32graph/Makefile.nt77 $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/win32graph/Makefile.nt
78 $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/systhreads/Makefile.nt78 $(SED) -i "s,@libdir@,$(PREFIX)/$(TARGET)/lib,g" $(1)/otherlibs/systhreads/Makefile.nt
79 for d in $(1)/otherlibs/win32unix \79 for d in $(1)/otherlibs/win32unix \
80 $(1)/otherlibs/win32graph \80 $(1)/otherlibs/win32graph \
81 $(1)/otherlibs/bigarray \81 $(1)/otherlibs/bigarray \
82 $(1)/otherlibs/systhreads; do \82 $(1)/otherlibs/systhreads; do \
83 ln -sf Makefile.nt $$d/Makefile; \83 ln -sf Makefile.nt $$d/Makefile; \
84 done84 done
85 # Now clean the temporary files from the previous build. This85 # Now clean the temporary files from the previous build. This
86 # will also cause asmcomp/arch.ml (etc) to be linked to the 32 bit86 # will also cause asmcomp/arch.ml (etc) to be linked to the 32 bit
87 # i386 versions, essentially causing ocamlopt to use the Win/i386 code87 # i386 versions, essentially causing ocamlopt to use the Win/i386 code
88 # generator.88 # generator.
89 $(MAKE) -C '$(1)' partialclean89 $(MAKE) -C '$(1)' partialclean
90 # We need to remove any .o object for make sure they are90 # We need to remove any .o object for make sure they are
91 # recompiled later..91 # recompiled later..
92 cd $(1) && rm byterun/*.o92 cd $(1) && rm byterun/*.o
93 93
94 ####### build mingw ocaml94 ####### build mingw ocaml
95 # Just rebuild some small bits that we need for the following95 # Just rebuild some small bits that we need for the following
96 # 'make opt' to work. Note that 'make all' fails here.96 # 'make opt' to work. Note that 'make all' fails here.
97 $(MAKE) -C '$(1)/byterun' libcamlrun.a97 $(MAKE) -C '$(1)/byterun' libcamlrun.a
98 $(MAKE) -C '$(1)' ocaml ocamlc98 $(MAKE) -C '$(1)' ocaml ocamlc
99 $(MAKE) -C '$(1)/stdlib'99 $(MAKE) -C '$(1)/stdlib'
100 $(MAKE) -C '$(1)/tools' ocamlmklib100 $(MAKE) -C '$(1)/tools' ocamlmklib
101 # Build ocamlopt101 # Build ocamlopt
102 $(MAKE) -C '$(1)' opt102 $(MAKE) -C '$(1)' opt
103 # Now build otherlibs for ocamlopt103 # Now build otherlibs for ocamlopt
104 cd '$(1)' && \104 cd '$(1)' && \
105 for i in $(OTHER_LIBS); do \105 for i in $(OTHER_LIBS); do \
106 $(MAKE) -C otherlibs/$$i clean; \106 $(MAKE) -C otherlibs/$$i clean; \
107 $(MAKE) -C otherlibs/$$i all; \107 $(MAKE) -C otherlibs/$$i all; \
108 $(MAKE) -C otherlibs/$$i allopt; \108 $(MAKE) -C otherlibs/$$i allopt; \
109 done109 done
110 110
111 ####### installation111 ####### installation
112 $(MAKE) -C '$(1)' install112 $(MAKE) -C '$(1)' install
113 $(MAKE) -C '$(1)' installopt113 $(MAKE) -C '$(1)' installopt
114 # Rename all the binaries to target-binary114 # Rename all the binaries to target-binary
115 for f in ocamlc ocamlcp ocamlrun ocamldep ocamlmklib ocamlmktop ocamlopt ocamlprof camlp4prof camlp4boot camlp4 camlp4oof camlp4of camlp4o camlp4rf camlp4r camlp4orf ocamldoc ; do \115 for f in ocamlc ocamlcp ocamlrun ocamldep ocamlmklib ocamlmktop ocamlopt ocamlprof camlp4prof camlp4boot camlp4 camlp4oof camlp4of camlp4o camlp4rf camlp4r camlp4orf ocamldoc ; do \
116 cp -f $(PREFIX)/$(TARGET)/bin/$$f $(PREFIX)/bin/$(TARGET)-$$f; \116 cp -f $(PREFIX)/$(TARGET)/bin/$$f $(PREFIX)/bin/$(TARGET)-$$f; \
117 done117 done
118 118
119 # test ocamlopt119 # test ocamlopt
120 cp '$(2).ml' '$(1)/test.ml'120 cp '$(2).ml' '$(1)/test.ml'
121 cd '$(1)' && '$(TARGET)-ocamlopt' test.ml121 cd '$(1)' && '$(TARGET)-ocamlopt' test.ml
122 # test ocamlbuild122 # test ocamlbuild
123 mkdir '$(1)/tmp' && cp '$(2).ml' '$(1)/tmp/test.ml'123 mkdir '$(1)/tmp' && cp '$(2).ml' '$(1)/tmp/test.ml'
124 cd '$(1)/tmp' && $(TARGET)-ocamlbuild test.native124 cd '$(1)/tmp' && $(TARGET)-ocamlbuild test.native
125 # test125 # test
126 cp '$(2).ml' '$(1)/test.ml'126 cp '$(2).ml' '$(1)/test.ml'
127 cd '$(1)' && '$(TARGET)-ocamlopt' test.ml127 cd '$(1)' && '$(TARGET)-ocamlopt' test.ml
128endef128endef
src/ocaml-flexdll-test.c+44−44
@@ -1,44 +1,44 @@
1/*****************************************************************1/*****************************************************************
2 FlexDLL2 FlexDLL
3 Alain Frisch3 Alain Frisch
4 4
5 Copyright 2007 Institut National de Recherche en Informatique et5 Copyright 2007 Institut National de Recherche en Informatique et
6 en Automatique.6 en Automatique.
7 7
8******************************************************************/8******************************************************************/
9 9
10/* An example (main program) */10/* An example (main program) */
11 11
12#include <stdlib.h>12#include <stdlib.h>
13#include <stdio.h>13#include <stdio.h>
14#include "flexdll.h"14#include "flexdll.h"
15 15
16typedef void torun();16typedef void torun();
17 17
18void api(char *msg){ printf("API: %s\n", msg); }18void api(char *msg){ printf("API: %s\n", msg); }
19 19
20int main(int argc, char **argv)20int main(int argc, char **argv)
21{21{
22 void *sym;22 void *sym;
23 void *handle;23 void *handle;
24 int i;24 int i;
25 torun *torun;25 torun *torun;
26 26
27 printf("INIT\n"); fflush(stdout);27 printf("INIT\n"); fflush(stdout);
28 flexdll_dump_exports(NULL);28 flexdll_dump_exports(NULL);
29 printf("OK\n"); fflush(stdout);29 printf("OK\n"); fflush(stdout);
30 for (i = 1; i < argc; i++) {30 for (i = 1; i < argc; i++) {
31 printf("** Loading %s\n", argv[i]);31 printf("** Loading %s\n", argv[i]);
32 handle = flexdll_dlopen(argv[i], FLEXDLL_RTLD_GLOBAL);32 handle = flexdll_dlopen(argv[i], FLEXDLL_RTLD_GLOBAL);
33 if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); }33 if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); }
34 printf("** handle = %p\n", handle);34 printf("** handle = %p\n", handle);
35 flexdll_dump_exports(handle);35 flexdll_dump_exports(handle);
36 flexdll_dump_relocations(handle);36 flexdll_dump_relocations(handle);
37 37
38 if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); }38 if (NULL == handle) { printf("error: %s\n", flexdll_dlerror()); exit(2); }
39 39
40 torun = flexdll_dlsym(handle, "torun");40 torun = flexdll_dlsym(handle, "torun");
41 if (torun) torun();41 if (torun) torun();
42 }42 }
43 exit(0);43 exit(0);
44}44}
src/ocaml-flexdll.mk+31−31
@@ -2,42 +2,42 @@ · 1 unmodified line
2# See doc/index.html for further information.2# See doc/index.html for further information.
3 3
4# zlib4# zlib
5PKG := ocaml-flexdll5PKG := ocaml-flexdll
6$(PKG)_IGNORE :=6$(PKG)_IGNORE :=
7$(PKG)_CHECKSUM := 585f066f890c7dca95be7541b4647128335f7df97$(PKG)_CHECKSUM := 585f066f890c7dca95be7541b4647128335f7df9
8$(PKG)_SUBDIR := flexdll8$(PKG)_SUBDIR := flexdll
9$(PKG)_FILE := flexdll-$($(PKG)_VERSION).tar.gz9$(PKG)_FILE := flexdll-$($(PKG)_VERSION).tar.gz
10$(PKG)_URL := http://alain.frisch.fr/flexdll/$($(PKG)_FILE)10$(PKG)_URL := http://alain.frisch.fr/flexdll/$($(PKG)_FILE)
11$(PKG)_DEPS := gcc ocaml-native11$(PKG)_DEPS := gcc ocaml-native
12 12
13define $(PKG)_UPDATE13define $(PKG)_UPDATE
14 wget -q -O- 'http://alain.frisch.fr/flexdll/' | \14 wget -q -O- 'http://alain.frisch.fr/flexdll/' | \
15 $(SED) -n 's,.*flexdll-\([0-9][^>]*\)\.tar.gz.*,\1,ip' | \15 $(SED) -n 's,.*flexdll-\([0-9][^>]*\)\.tar.gz.*,\1,ip' | \
16 head -116 head -1
17endef17endef
18 18
19define $(PKG)_BUILD19define $(PKG)_BUILD
20 $(MAKE) -C '$(1)' -j '$(JOBS)' \20 $(MAKE) -C '$(1)' -j '$(JOBS)' \
21 CHAINS=mingw \21 CHAINS=mingw \
22 MINGW_PREFIX=$(TARGET) \22 MINGW_PREFIX=$(TARGET) \
23 OCAMLOPT=$(PREFIX)/$(TARGET)/bin/ocaml-native/ocamlopt \23 OCAMLOPT=$(PREFIX)/$(TARGET)/bin/ocaml-native/ocamlopt \
24 all24 all
25 mkdir -p '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll'25 mkdir -p '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll'
26 cd '$(1)' && mv flexlink.exe flexlink26 cd '$(1)' && mv flexlink.exe flexlink
27 cd '$(1)' && strip --remove-section=.comment --remove-section=.note flexlink27 cd '$(1)' && strip --remove-section=.comment --remove-section=.note flexlink
28 cd '$(1)' && $(INSTALL) -m 0755 flexdll.h '$(PREFIX)/$(TARGET)/include'28 cd '$(1)' && $(INSTALL) -m 0755 flexdll.h '$(PREFIX)/$(TARGET)/include'
29 cd '$(1)' && $(INSTALL) -m 0755 flexlink flexdll_mingw.o \29 cd '$(1)' && $(INSTALL) -m 0755 flexlink flexdll_mingw.o \
30 flexdll_initer_mingw.o \30 flexdll_initer_mingw.o \
31 '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll'31 '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll'
32 # create flexdll scripts32 # create flexdll scripts
33 cd '$(PREFIX)/bin' && ln -sf '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll/flexlink'33 cd '$(PREFIX)/bin' && ln -sf '$(PREFIX)/$(TARGET)/lib/ocaml/flexdll/flexlink'
34 (echo '#!/bin/sh'; \34 (echo '#!/bin/sh'; \
35 echo 'exec flexlink -I $(PREFIX)/$(TARGET)/lib -chain mingw -nocygpath "$$@"') \35 echo 'exec flexlink -I $(PREFIX)/$(TARGET)/lib -chain mingw -nocygpath "$$@"') \
36 > '$(PREFIX)/bin/$(TARGET)-flexlink'36 > '$(PREFIX)/bin/$(TARGET)-flexlink'
37 chmod 0755 '$(PREFIX)/bin/$(TARGET)-flexlink'37 chmod 0755 '$(PREFIX)/bin/$(TARGET)-flexlink'
38 38
39 echo "testing flexlink..."39 echo "testing flexlink..."
40 $(MAKE) -C '$(1)/test' -j '$(JOBS)' dump.exe plug1.dll plug2.dll CC=$(TARGET)-gcc O=o FLEXLINK=$(TARGET)-flexlink40 $(MAKE) -C '$(1)/test' -j '$(JOBS)' dump.exe plug1.dll plug2.dll CC=$(TARGET)-gcc O=o FLEXLINK=$(TARGET)-flexlink
41 #works if wine is installed :41 #works if wine is installed :
42 #cd '$(1)/test' && ./dump.exe plug1.dll plug2.dll42 #cd '$(1)/test' && ./dump.exe plug1.dll plug2.dll
43endef43endef
src/ocaml-native.mk+29−29
@@ -2,39 +2,39 @@ · 1 unmodified line
2# See doc/index.html for further information.2# See doc/index.html for further information.
3 3
4# zlib4# zlib
5PKG := ocaml-native5PKG := ocaml-native
6$(PKG)_IGNORE :=6$(PKG)_IGNORE :=
7$(PKG)_CHECKSUM := 9653e76dd14f0fbb750d7b438415890ab9fe2f4e7$(PKG)_CHECKSUM := 9653e76dd14f0fbb750d7b438415890ab9fe2f4e
8$(PKG)_SUBDIR := ocaml-$($(PKG)_VERSION)8$(PKG)_SUBDIR := ocaml-$($(PKG)_VERSION)
9$(PKG)_FILE := ocaml-$($(PKG)_VERSION).tar.gz9$(PKG)_FILE := ocaml-$($(PKG)_VERSION).tar.gz
10$(PKG)_URL := http://caml.inria.fr/pub/distrib/ocaml-4.00/$($(PKG)_FILE)10$(PKG)_URL := http://caml.inria.fr/pub/distrib/ocaml-4.00/$($(PKG)_FILE)
11$(PKG)_DEPS := gcc11$(PKG)_DEPS := gcc
12 12
13define $(PKG)_UPDATE13define $(PKG)_UPDATE
14 wget -q -O- 'http://caml.inria.fr/pub/distrib/ocaml-3.12' | \14 wget -q -O- 'http://caml.inria.fr/pub/distrib/ocaml-3.12' | \
15 $(SED) -n 's,.*ocaml-\([0-9][^>]*\)\.tar.*,\1,ip' | \15 $(SED) -n 's,.*ocaml-\([0-9][^>]*\)\.tar.*,\1,ip' | \
16 tail -116 tail -1
17endef17endef
18 18
19define $(PKG)_BUILD19define $(PKG)_BUILD
20 # patched ocaml source to get ocamlbuild use $(TARGET)-ocamlc, $(TARGET)-ocamlfind, ...20 # patched ocaml source to get ocamlbuild use $(TARGET)-ocamlc, $(TARGET)-ocamlfind, ...
21 cd '$(1)' && ./configure \21 cd '$(1)' && ./configure \
22 -prefix '$(PREFIX)/$(TARGET)' \22 -prefix '$(PREFIX)/$(TARGET)' \
23 -bindir '$(PREFIX)/$(TARGET)/bin/ocaml-native' \23 -bindir '$(PREFIX)/$(TARGET)/bin/ocaml-native' \
24 -libdir '$(PREFIX)/$(TARGET)/lib/ocaml-native' \24 -libdir '$(PREFIX)/$(TARGET)/lib/ocaml-native' \
25 -no-tk \25 -no-tk \
26 -no-shared-libs \26 -no-shared-libs \
27 -verbose27 -verbose
28 $(MAKE) -C '$(1)' -j 1 world opt28 $(MAKE) -C '$(1)' -j 1 world opt
29 $(SED) -i "s,@target@,$(TARGET),g" $(1)/ocamlbuild/options.ml29 $(SED) -i "s,@target@,$(TARGET),g" $(1)/ocamlbuild/options.ml
30 $(SED) -i "s,@target@,$(TARGET),g" $(1)/ocamlbuild/findlib.ml30 $(SED) -i "s,@target@,$(TARGET),g" $(1)/ocamlbuild/findlib.ml
31 $(MAKE) -C '$(1)' -j '$(JOBS)' ocamlbuild.native31 $(MAKE) -C '$(1)' -j '$(JOBS)' ocamlbuild.native
32 cp -f '$(1)/_build/ocamlbuild/ocamlbuild.native' $(PREFIX)/bin/$(TARGET)-ocamlbuild32 cp -f '$(1)/_build/ocamlbuild/ocamlbuild.native' $(PREFIX)/bin/$(TARGET)-ocamlbuild
33 $(MAKE) -C '$(1)' install33 $(MAKE) -C '$(1)' install
34 # the following script requires ocamlbuild with option -ocamlfind to work34 # the following script requires ocamlbuild with option -ocamlfind to work
35 #(echo '#!/bin/sh'; \35 #(echo '#!/bin/sh'; \
36 # echo 'exec $(PREFIX)/bin/ocamlbuild -use-ocamlfind -ocamlfind $(TARGET)-ocamlfind "$$@"') \36 # echo 'exec $(PREFIX)/bin/ocamlbuild -use-ocamlfind -ocamlfind $(TARGET)-ocamlfind "$$@"') \
37 # > '$(PREFIX)/bin/$(TARGET)-ocamlbuild'37 # > '$(PREFIX)/bin/$(TARGET)-ocamlbuild'
38 #chmod 0755 '$(PREFIX)/bin/$(TARGET)-ocamlbuild'38 #chmod 0755 '$(PREFIX)/bin/$(TARGET)-ocamlbuild'
39 # test will be done once cross ocamlopt is built39 # test will be done once cross ocamlopt is built
40endef40endef

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t