Commit e762ddae authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-10-24 09:19:30 by szach] - reworked link order for new schema implementation

- added support for generating .annot and .mli

Original author: szach
Date: 2003-10-24 09:19:30+00:00
parent 36559e8b
...@@ -40,6 +40,14 @@ else ...@@ -40,6 +40,14 @@ else
endif endif
OPT = -warn-error FPS OPT = -warn-error FPS
ANNOT =
INTERFACE =
ifeq ($(ANNOT), true)
OPT += -passopt -dtypes
endif
ifeq ($(INTERFACE), true)
OPT += -passopt -i
endif
OCAMLFIND = ocamlfind OCAMLFIND = ocamlfind
CAMLC = $(OCAMLFIND) $(CAMLC_P) $(OPT) -package "$(PACKAGES)" CAMLC = $(OCAMLFIND) $(CAMLC_P) $(OPT) -package "$(PACKAGES)"
CAMLOPT = $(OCAMLFIND) $(CAMLOPT_P) $(OPT) -package "$(PACKAGES)" CAMLOPT = $(OCAMLFIND) $(CAMLOPT_P) $(OPT) -package "$(PACKAGES)"
...@@ -52,8 +60,7 @@ else ...@@ -52,8 +60,7 @@ else
LINK = $(CAMLC) -custom -linkpkg gramlib.cma LINK = $(CAMLC) -custom -linkpkg gramlib.cma
endif endif
all: cduce dtd2cduce all: cduce dtd2cduce validate
install: all install: all
mkdir -p $(PREFIX)/bin/ mkdir -p $(PREFIX)/bin/
...@@ -85,8 +92,11 @@ OBJECTS = \ ...@@ -85,8 +92,11 @@ OBJECTS = \
\ \
runtime/value.cmo \ runtime/value.cmo \
\ \
schema/schema_types.cmo schema/schema_xml.cmo schema/schema_builtin.cmo \ schema/schema_xml.cmo \
schema/schema_validator.cmo schema/schema_parser.cmo \ schema/schema_common.cmo \
schema/schema_builtin.cmo \
schema/schema_validator.cmo \
schema/schema_parser.cmo \
\ \
parser/location.cmo parser/ulexer.cmo parser/ast.cmo parser/parser.cmo \ parser/location.cmo parser/ulexer.cmo parser/ast.cmo parser/parser.cmo \
\ \
...@@ -102,15 +112,18 @@ OBJECTS = \ ...@@ -102,15 +112,18 @@ OBJECTS = \
\ \
types/builtin.cmo driver/librarian.cmo driver/cduce.cmo types/builtin.cmo driver/librarian.cmo driver/cduce.cmo
VALIDATE_OBJECTS := $(shell for o in $(OBJECTS); do echo $$o; if [ "$$o" = "schema/schema_parser.cmo" ]; then exit 0; fi; done) # all objects until schema_parser.cmo
CDUCE = $(OBJECTS) driver/run.cmo CDUCE = $(OBJECTS) driver/run.cmo
WEBIFACE = $(OBJECTS) driver/examples.cmo driver/webiface.cmo WEBIFACE = $(OBJECTS) driver/examples.cmo driver/webiface.cmo
DTD2CDUCE = tools/dtd2cduce.cmo DTD2CDUCE = tools/dtd2cduce.cmo
ALL_OBJECTS = $(OBJECTS) \ ALL_OBJECTS = $(OBJECTS) \
driver/run.cmo driver/examples.cmo driver/webiface.cmo \ driver/run.cmo driver/examples.cmo driver/webiface.cmo \
tools/dtd2cduce.cmo tools/dtd2cduce.cmo tools/validate.cmo
ALL_INTERFACES = schema/schema_types.mli
DEPEND = $(ALL_OBJECTS:.cmo=.ml) $(ALL_OBJECTS:.cmo=.mli) DEPEND = $(ALL_OBJECTS:.cmo=.ml) $(ALL_OBJECTS:.cmo=.mli) $(ALL_INTERFACES)
INCLUDES = $(DIRS:%=-I %) INCLUDES = $(DIRS:%=-I %)
...@@ -128,15 +141,16 @@ webiface: $(WEBIFACE:.cmo=.$(EXTENSION)) ...@@ -128,15 +141,16 @@ webiface: $(WEBIFACE:.cmo=.$(EXTENSION))
dtd2cduce: $(DTD2CDUCE:.cmo=.$(EXTENSION)) dtd2cduce: $(DTD2CDUCE:.cmo=.$(EXTENSION))
$(LINK) $(INCLUDES) -o $@ $^ $(LINK) $(INCLUDES) -o $@ $^
validate: $(OBJECTS:.cmo=.$(EXTENSION)) tools/validate.ml validate: $(VALIDATE_OBJECTS) tools/validate.cmo
$(LINK) $(INCLUDES) -o $@ $^ $(LINK) $(INCLUDES) -o $@ $^
.PHONY: compute_depend .PHONY: compute_depend
compute_depend: $(DEPEND_OCAMLDEP) compute_depend: $(DEPEND_OCAMLDEP)
echo $(DEPEND)
@echo "Computing dependencies ..." @echo "Computing dependencies ..."
ocamlfind ocamldep -package "$(PACKAGES)" $(INCLUDES) $(SYNTAX_PARSER) $(DEPEND) | \ ocamlfind ocamldep -package "$(PACKAGES)" \
sed -e "s|: |: misc/q_symbol.cmo |" > depend $(INCLUDES) $(SYNTAX_PARSER) $(DEPEND) | \
sed -e "s|: |: misc/q_symbol.cmo |" > depend
clean: clean:
for i in $(CLEAN_DIRS); do \ for i in $(CLEAN_DIRS); do \
(cd $$i; rm -f *.cmi *.cmo *.cma *.cmx *.o *~); \ (cd $$i; rm -f *.cmi *.cmo *.cma *.cmx *.o *~); \
......
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