Permalink
Browse files

This commit was manufactured by cvs2svn to create tag 'ocaml3102rc1'.

git-svn-id: http://caml.inria.fr/svn/ocaml/release/3.10.2-rc1@8812 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
  • Loading branch information...
1 parent 6442135 commit d40464c516bbc7cadfe3d334c5826abfd622a6ae (no author) committed Feb 19, 2008
@@ -1 +0,0 @@
-<*caml.o>: output_obj
@@ -1,5 +0,0 @@
-let x = X.x
-
-let rec fib n = if n <= 1 then 1 else fib (n - 1) + fib (n - 2)
-
-let () = Callback.register "fib" fib
@@ -1,7 +0,0 @@
- /* -*- C -*- */
-#include <caml/mlvalues.h>
-#include <caml/callback.h>
-int fib(int n)
-{
- return Int_val(caml_callback(*caml_named_value("fib"), Val_int(n)));
-}
@@ -1,10 +0,0 @@
- /* -*- C -*- */
-#include <stdio.h>
-#include <caml/callback.h>
-extern int fib(int);
-int main(int argc, char** argv)
-{
- caml_startup(argv);
- printf("fib(12) = %d\n", fib(12));
- return 0;
-}
@@ -1,35 +0,0 @@
-open Ocamlbuild_plugin;;
-open Command;;
-
-let cc = A"cc";;
-let ar = A"ar";;
-
-dispatch begin function
-| After_rules ->
- let libasmrun = !*Ocamlbuild_pack.Ocaml_utils.stdlib_dir/"libasmrun.a" in
-
- flag ["ocaml"; "link"; "output_obj"] (A"-output-obj");
-
- rule "output C obj"
- ~deps:["%.cmx"; "%.o"]
- ~prod:"%caml.o"
- (Ocamlbuild_pack.Ocaml_compiler.native_link "%.cmx" "%caml.o");
-
- rule "build C lib"
- ~deps:["%wrap.o"; "%caml.o"]
- ~prod:"lib%.a"
- begin fun env _ ->
- let wrap_o = env "%wrap.o" and caml_o = env "%caml.o"
- and lib_a = env "lib%.a" in
- Seq[cp libasmrun lib_a;
- Cmd(S[ar; A"r"; Px lib_a; P caml_o; P wrap_o])]
- end;
- rule "build main"
- ~deps:["libfib.a"; "main.o"]
- ~prod:"main"
- begin fun _ _ ->
- Cmd(S[cc; P"main.o"; P"libfib.a"; A"-o"; Px"main"])
- end;
-| _ -> ()
-end
-
@@ -1 +0,0 @@
-let x = 42
@@ -1 +0,0 @@
-foo
@@ -1 +0,0 @@
-foo1
@@ -1 +0,0 @@
-foo2
@@ -1,11 +0,0 @@
-open Ocamlbuild_plugin;;
-dispatch begin function
- | After_rules ->
- rule "copy foo"
- ~prod:"bar"
- ~dep:"foo.otarget"
- begin fun _env _build ->
- cp "foo" "bar"
- end
- | _ -> ()
-end
@@ -1,16 +0,0 @@
-#!/bin/sh
-cd `dirname $0`
-set -e
-set -x
-CMDOPTS="" # -- command args
-BUILD="../../_build/ocamlbuild.native bar -no-skip -classic-display $@"
-BUILD1="$BUILD $CMDOPTS"
-BUILD2="$BUILD -verbose 0 -nothing-should-be-rebuilt $CMDOPTS"
-rm -rf _build
-cp foo1 foo
-$BUILD1
-$BUILD2
-cp foo2 foo
-$BUILD1 -verbose 0
-$BUILD2
-rm foo

0 comments on commit d40464c

Please sign in to comment.