Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
fbeb4f18
Commit
fbeb4f18
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2004-02-19 04:07:32 by afrisch] Simplifie crion de cdo2cmo, renommn cduce2ocaml
Original author: afrisch Date: 2004-02-19 04:07:33+00:00
parent
7859a868
Changes
5
Hide whitespace changes
Inline
Side-by-side
Makefile.distrib
View file @
fbeb4f18
...
...
@@ -78,9 +78,13 @@ CAMLOPT = $(OCAMLFIND) $(CAMLOPT_P) $(OPT) -package "$(PACKAGES)"
ifeq
($(NATIVE), true)
EXTENSION
=
cmx
EXTENSION_LIB
=
cmxa
COMPILE
=
$(CAMLOPT)
LINK
=
$(CAMLOPT)
-linkpkg
gramlib.cmxa
else
EXTENSION
=
cmo
EXTENSION_LIB
=
cma
COMPILE
=
$(CAMLC)
LINK
=
$(CAMLC)
-custom
-linkpkg
gramlib.cma
endif
...
...
@@ -184,9 +188,9 @@ INCLUDES = $(DIRS:%=-I %)
cduce
:
$(CDUCE:.cmo=.$(EXTENSION))
$(LINK)
$(INCLUDES)
-o
$@
$^
$(EXTRA_LINK_OPTS)
cDuce_all
:
$(OBJECTS
)
$(C
AMLC
)
-o
cDuce_all.
cmo
-pack
$(OBJECTS)
$(
CAMLC
)
-a
-o
cDuce_all.cma
-linkpkg
gramlib.cma cDuce_all.cmo
cDuce_all
.$(EXTENSION_LIB)
:
$(OBJECTS:.cmo=.$(EXTENSION)
)
$(C
OMPILE
)
-o
cDuce_all.
$(EXTENSION)
-pack
$^
$(
LINK
)
-a
-o
$@
cDuce_all.
$(EXTENSION)
webiface
:
$(WEBIFACE:.cmo=.$(EXTENSION))
$(LINK)
-verbose
$(INCLUDES)
-o
$@
$^
-ccopt
-static
...
...
@@ -261,3 +265,8 @@ install_web: website
fi
;
cp
web/img/
*
.
*
$(HTML_DIR)
/img
#*: help
cduce2ocaml
:
cDuce_all.$(EXTENSION_LIB)
rm
-f
cduce2ocaml
(
cd
cdo2cmo
;
$(MAKE)
clean
;
$(MAKE)
NATIVE
=
$(NATIVE)
)
cdo2cmo/INSTALL
View file @
fbeb4f18
...
...
@@ -24,21 +24,12 @@ If you install all your sources in /usr/local/src/ then
and optionally
make install_liball.opt
make install_liball.opt
5)
Go in
the cduce
source directory and create cDuce_all
5)
Create
the cduce
2ocaml binary by running from the root of CDuce source tree:
cd /usr/local/src/cduce
make cDuce_all
make cduce2ocaml
Now look at the README file to see how to use the command cduce2ocaml.
6) Go in the cdo2cmo dir create a new lilb directory and copy
there the cDuce_all.* files and make all
cd cdo2cmo
mkdir lib
cp ../cDuce_all.* lib
make
Now look at the README file to see how to use the command cdo2cmo
cdo2cmo/Makefile
View file @
fbeb4f18
ifeq
($(NATIVE), true)
EXTENSION
=
cmx
EXTENSION_LIB
=
cmxa
LINK
=
ocamlopt
else
EXTENSION
=
cmo
EXTENSION_LIB
=
cma
LINK
=
ocamlc
endif
OBJECTS
=
src/types.cmo src/ocaml.cmo src/cduce.cmo src/checker.cmo
\
src/generator.cmo src/main.cmo
INTERFACES
=
$(
shell
for
o
in
$(OBJECTS)
;
do
echo
$
${o%cmo}
cmi
;
done
)
BIN
=
cdo2cmo
INCLUDES
=
-I
src
-I
lib
LIBS
=
oCaml_all.cma lib/cDuce_all.cma
BIN
=
../cduce2ocaml
INCLUDES
=
-I
src
-I
..
LIBS
=
oCaml_all.cma ../cDuce_all.cma
all
:
$(BIN)
$(BIN)
:
$(OBJECTS)
ocamlc
-g
-o
$(BIN)
$(LIBS)
$(OBJECTS)
$(BIN)
:
$(OBJECTS
:.cmo=.$(EXTENSION)
)
$(LINK)
-o
$@
$
(
LIBS:.cma
=
.
$(EXTENSION_LIB)
)
$^
.SUFFIXES
:
.mli .ml .cmi .cmo
.SUFFIXES
:
.mli .ml .cmi .cmo
.cmx
.mli.cmi
:
ocamlc
-g
$(INCLUDES)
$(LIBS)
-c
$<
ocamlc
$(INCLUDES)
-c
$<
.ml.cmo
:
ocamlc
-g
$(INCLUDES)
$(LIBS)
-c
$<
ocamlc
$(INCLUDES)
-c
$<
.ml.cmx
:
ocamlopt
$(INCLUDES)
-c
$<
clean
:
rm
-f
$(OBJECTS)
$(INTERFACES)
$(BIN)
src/
*
~
rm
-f
src/
*
.cmi src/
*
.cmo src/
*
.cmx src/
*
.o
$(BIN)
src/
*
~
.depend depend
:
rm
-f
.depend
ocamldep src/
*
.ml src/
*
.mli
>
.depend
include
.depend
cdo2cmo/README
View file @
fbeb4f18
...
...
@@ -23,7 +23,7 @@ let f ( Printer -> [ ML_int * ] -> [] ) g ->
4) Generate test.cmo from test.cdo
cd
o2cmo
test.cmi test.cdo
cd
uce2ocaml
test.cmi test.cdo
5) Now you can call f from a ocaml program say main.ml
...
...
cdo2cmo/ocaml_cdo2cmo_patch
View file @
fbeb4f18
...
...
@@ -24,7 +24,7 @@
+ install_liball.opt: $(ALLLIB:.cmo=.cmx)
+ $(CAMLOPT) -pack -o oCaml_all.cmx $(ALLLIB:.cmo=.cmx)
+ $(CAMLOPT) -a -o oCaml_all.cmxa oCaml_all.cmx
+ cp -f oCaml_all.cmxa oCaml_all.cmi $(LIBDIR)
+ cp -f oCaml_all.cmxa oCaml_all.cmi
oCaml_all.a
$(LIBDIR)
+
partialclean::
rm -f ocaml toplevel/toplevellib.cma
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment