Commit 339a5a79 authored by Pietro Abate's avatar Pietro Abate

[r2007-06-20 09:28:44 by afrisch] make it work with natdynlink

Original author: afrisch
Date: 2007-06-20 09:28:44+00:00
parent 7896d25d
default: cduce
include Makefile.conf
include VERSION
......@@ -14,7 +16,7 @@ ifeq ($(NATIVE),true)
all: cduce_lib.cmxa
endif
PACKAGES = ulex camlp4 pcre num netstring cgi
PACKAGES = camlp4 ulex pcre num netstring cgi
# Call make with VERBOSE=true to get a trace of commands
......@@ -66,7 +68,11 @@ ifeq ($(NATIVE), true)
EXTENSION_LIB = cmxa
CAML=ocamlopt
COMPILE = $(CAMLOPT)
LINK = $(CAMLOPT) -linkpkg camlp4lib.cmxa
LINK = $(CAMLOPT) -linkpkg
ifeq ($(NATDYNLINK), true)
LINK += dynlink.cmxa
endif
LINK += camlp4lib.cmxa
SYNTAX += -symbol ocaml_compiler=\"native\"
else
EXTENSION = cmo
......@@ -224,7 +230,8 @@ ALL_INTERFACES = schema/schema_types.mli
DEPEND = $(ALL_OBJECTS:.cmo=.ml) $(ALL_OBJECTS:.cmo=.mli) $(ALL_INTERFACES)
INCLUDES = $(DIRS:%=-I %) -I +camlp4
INCLUDES = $(DIRS:%=-I %)
# -I +camlp4
cduce: $(CDUCE:.cmo=.$(EXTENSION))
@echo "Build $@"
......@@ -303,7 +310,7 @@ doc: cduce web/site.cdo
mkdir -p web/doc
(cd web; ../cduce --run site.cdo --arg doc.xml -o doc)
web/site.cdo: cduce web/xhtml.cdo web/site.cd
web/site.cdo: cduce web/xhtml.cdo web/site.cd web/siteTypes.cd
./cduce -I web/ --compile web/site.cd
web/xhtml.cdo: cduce web/xhtml.cd
......
......@@ -241,6 +241,13 @@ let has_forpack =
else
(print "not available\n"; false)
let has_natdynlink =
print "testing for native dynlink: ";
if Sys.command "ocamlopt -o foo dynlink.cmxa && rm -f foo" = 0 then
(printf "available\n"; true)
else
(print "not available\n"; false)
let () =
List.iter need_pkg required_packages;
if pxp then (
......@@ -271,4 +278,5 @@ let () =
fprintf out "EXE=%s\n" exe;
fprintf out "PROFILE=false\n";
fprintf out "FORPACK=%b\n" has_forpack;
fprintf out "NATDYNLINK=%b\n" has_natdynlink;
close_out out
......@@ -29,7 +29,6 @@ type Link =
type Content =
[ ( <p style=?String>[InlineText*]
| <ul>[<li>Content +]
| <ol style=?String>[<li>Content +]
| <section title=String>Content
| <sample highlight=?"true"|"false">String
......@@ -46,6 +45,7 @@ type Content =
| <footnotes>[]
| <xhtml>H.Flow
| <demo label=?String prefix=?String>String
| <ul>[<li>Content +]
| InlineText
)* ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment