Commit 8e5290cf authored by Kim Nguyễn's avatar Kim Nguyễn

* Tweak the makefile to support parallel builds

* Simplify the workaround to compile types/boolVar.ml (it contains a variant `True and `False
  which make camlp4 go crazy)
* Regenerate the "depend" file (must be by calling make depend after
  adding new source files).
parent f49dc4b9
......@@ -8,7 +8,7 @@ pull: tools/pull.$(EXTENSION)
PREPRO = camlp4o -I `ocamlfind query ulex` pa_ulex.cma pr_o.cmo $(SYNTAX) -sep "\n"
profile: misc/q_symbol.cmo
profile: misc/q_symbol.cmo.stamp
rm -Rf prepro
mkdir prepro
for i in $(DIRS); do \
......
......@@ -42,9 +42,9 @@ CAMLC_P = ocamlc -g
DEPEND_OCAMLDEP = misc/q_symbol.cmo
ifeq ($(PROFILE), true)
CAMLOPT_P = ocamlopt -p -inline 10000
ifeq ($(NATIVE), false)
ifeq ($(NATIVE), false)
CAMLC_P = ocamlcp -p a
SYNTAX_PARSER =
SYNTAX_PARSER =
DEPEND_OCAMLDEP =
endif
else
......@@ -136,7 +136,7 @@ help:
@echo " clean : back to the starting point"
@echo " uninstall : remove installed files"
# Source directories
# Source directories
DIRS = misc parser schema typing types compile runtime driver query ocamliface win32
CLEAN_DIRS = $(DIRS) tools tests
......@@ -229,7 +229,7 @@ endif
all: $(ALL_TARGET)
OBJECTS += driver/run.cmo
CDUCE = $(OBJECTS) driver/start.cmo
CDUCE = $(OBJECTS) driver/start.cmo
ALL_OBJECTS = $(OBJECTS) \
driver/start.cmo driver/examples.cmo \
......@@ -279,6 +279,7 @@ clean:
for i in $(CLEAN_DIRS); do \
(cd $$i; rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa *~); \
done
rm -f misc/q_symbol.cmo.stamp
(cd ocamliface; $(MAKE) clean)
rm -f `find . -name "*~"`
rm -f *.cmi *.cmo *.cma *.cmx *.a *.cmxa *.o *~ META
......@@ -301,35 +302,31 @@ distclean: clean
ocamliface/mltypes.$(EXTENSION): ocamliface/caml_cduce.$(EXTENSION)
$(ALL_OBJECTS:.cmo=.$(EXTENSION)): misc/q_symbol.cmo
$(ALL_INTERFACES): misc/q_symbol.cmo
.SUFFIXES: .ml .mli .cmo .cmi .cmx
$(ALL_OBJECTS:.cmo=.cmi): misc/q_symbol.cmo
$(ALL_OBJECTS:.cmo=.cmx) caml_cduce.cmx: misc/q_symbol.cmo
$(ALL_OBJECTS) caml_cduce.cmo: misc/q_symbol.cmo
$(OCAMLIFACE)/mlstub.$(EXTENSION): SYNTAX += q_MLast.cmo
misc/q_symbol.cmo: misc/q_symbol.ml
@echo "Build $@"
$(HIDE)$(CAMLC) -c -pp camlp4orf $<
types/%.cmo: types/%.ml
@echo "Build $@"
$(HIDE)$(CAMLC) -c $(INCLUDES) $<
$(HIDE) $(CAMLC) -c -pp camlp4orf $<
.SUFFIXES: .ml .mli .cmo .cmi .cmx
types/boolVar.cmo: SYNTAX_PARSER=
types/boolVar.cmi: SYNTAX_PARSER=
types/boolVar.cmx: SYNTAX_PARSER=
.ml.cmo:
@echo "Build $@"
$(HIDE)$(CAMLC) -c $(INCLUDES) $(SYNTAX_PARSER) $<
types/%.cmx: types/%.ml
@echo "Build $@"
$(HIDE)$(CAMLOPT) $(FORPACKOPT) -c $(INCLUDES) $<
.ml.cmx:
@echo "Build $@"
$(HIDE)$(CAMLOPT) $(FORPACKOPT) -c $(SYNTAX_PARSER) $(INCLUDES) $<
types/%.cmi: types/%.mli
@echo "Build $@"
$(HIDE)$(CAMLC) -c $(INCLUDES) $<
.mli.cmi:
@echo "Build $@"
$(HIDE)$(CAMLC) -c $(SYNTAX_PARSER) $(INCLUDES) $<
......@@ -370,4 +367,3 @@ ocamliface/caml_cduce.cmo:
ocamliface/caml_cduce.cmx:
@cd ocamliface; \
$(MAKE) caml_cduce.cmx
......@@ -24,8 +24,10 @@ types/sortedList.cmo : misc/custom.cmo types/sortedList.cmi
types/sortedList.cmx : misc/custom.cmx types/sortedList.cmi
misc/bool.cmo : misc/custom.cmo misc/bool.cmi
misc/bool.cmx : misc/custom.cmx misc/bool.cmi
types/ident.cmo : types/sortedList.cmi misc/ns.cmi misc/encodings.cmi
types/ident.cmx : types/sortedList.cmx misc/ns.cmx misc/encodings.cmx
types/ident.cmo : misc/utils.cmo types/sortedList.cmi misc/ns.cmi \
misc/encodings.cmi
types/ident.cmx : misc/utils.cmx types/sortedList.cmx misc/ns.cmx \
misc/encodings.cmx
types/intervals.cmo : types/intervals.cmi
types/intervals.cmx : types/intervals.cmi
types/chars.cmo : misc/custom.cmo types/chars.cmi
......@@ -36,8 +38,10 @@ types/atoms.cmx : misc/upool.cmx types/sortedList.cmx misc/ns.cmx \
misc/imap.cmx misc/encodings.cmx types/atoms.cmi
types/normal.cmo : types/normal.cmi
types/normal.cmx : types/normal.cmi
types/var.cmo : misc/custom.cmo types/var.cmi
types/var.cmx : misc/custom.cmx types/var.cmi
types/var.cmo : misc/utils.cmo types/sortedList.cmi misc/custom.cmo \
types/var.cmi
types/var.cmx : misc/utils.cmx types/sortedList.cmx misc/custom.cmx \
types/var.cmi
types/boolVar.cmo : types/var.cmi misc/custom.cmo types/boolVar.cmi
types/boolVar.cmx : types/var.cmx misc/custom.cmx types/boolVar.cmi
types/types.cmo : types/var.cmi misc/utils.cmo misc/stats.cmi \
......@@ -106,12 +110,14 @@ schema/schema_validator.cmx : runtime/value.cmx schema/schema_types.cmx \
schema/schema_pcre.cmx schema/schema_common.cmx schema/schema_builtin.cmx \
misc/ns.cmx misc/encodings.cmx types/atoms.cmx \
schema/schema_validator.cmi
types/patterns.cmo : misc/upool.cmi types/types.cmi types/sortedList.cmi \
types/sequence.cmi types/ident.cmo misc/encodings.cmi misc/custom.cmo \
types/chars.cmi compile/auto_pat.cmi types/atoms.cmi types/patterns.cmi
types/patterns.cmx : misc/upool.cmx types/types.cmx types/sortedList.cmx \
types/sequence.cmx types/ident.cmx misc/encodings.cmx misc/custom.cmx \
types/chars.cmx compile/auto_pat.cmx types/atoms.cmx types/patterns.cmi
types/patterns.cmo : misc/utils.cmo misc/upool.cmi types/types.cmi \
types/sortedList.cmi types/sequence.cmi types/ident.cmo \
misc/encodings.cmi misc/custom.cmo types/chars.cmi compile/auto_pat.cmi \
types/atoms.cmi types/patterns.cmi
types/patterns.cmx : misc/utils.cmx misc/upool.cmx types/types.cmx \
types/sortedList.cmx types/sequence.cmx types/ident.cmx \
misc/encodings.cmx misc/custom.cmx types/chars.cmx compile/auto_pat.cmx \
types/atoms.cmx types/patterns.cmi
compile/print_auto.cmo : types/types.cmi types/ident.cmo \
compile/auto_pat.cmi compile/print_auto.cmi
compile/print_auto.cmx : types/types.cmx types/ident.cmx \
......@@ -286,9 +292,9 @@ query/query_aggregates.cmo : runtime/value.cmi types/sequence.cmi \
compile/operators.cmi types/intervals.cmi types/builtin_defs.cmi
query/query_aggregates.cmx : runtime/value.cmx types/sequence.cmx \
compile/operators.cmx types/intervals.cmx types/builtin_defs.cmx
parser/cduce_curl.cmo : runtime/value.cmi parser/url.cmi \
parser/cduce_netclient.cmo : runtime/value.cmi parser/url.cmi \
driver/cduce_config.cmi
parser/cduce_curl.cmx : runtime/value.cmx parser/url.cmx \
parser/cduce_netclient.cmx : runtime/value.cmx parser/url.cmx \
driver/cduce_config.cmx
runtime/cduce_pxp.cmo : runtime/value.cmi parser/url.cmi \
schema/schema_xml.cmi runtime/load_xml.cmi driver/cduce_config.cmi \
......
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