]> matita.cs.unibo.it Git - helm.git/commitdiff
no more multiple configure/Makefile, just one for both ocaml/ and matita/
authorStefano Zacchiroli <zack@upsilon.cc>
Thu, 2 Feb 2006 14:02:18 +0000 (14:02 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Thu, 2 Feb 2006 14:02:18 +0000 (14:02 +0000)
43 files changed:
helm/Makefile
helm/Makefile.defs.in [new file with mode: 0644]
helm/configure.ac
helm/matita/Makefile [new file with mode: 0644]
helm/matita/Makefile.in [deleted file]
helm/matita/configure.ac [deleted file]
helm/ocaml/Makefile [new file with mode: 0644]
helm/ocaml/Makefile.common [new file with mode: 0644]
helm/ocaml/Makefile.common.in [deleted file]
helm/ocaml/Makefile.defs.in [deleted file]
helm/ocaml/Makefile.in [deleted file]
helm/ocaml/acic_content/Makefile
helm/ocaml/cic/Makefile
helm/ocaml/cic_acic/Makefile
helm/ocaml/cic_disambiguation/Makefile
helm/ocaml/cic_proof_checking/Makefile
helm/ocaml/cic_proof_checking/utilities/Makefile
helm/ocaml/cic_unification/Makefile
helm/ocaml/configure.ac [deleted file]
helm/ocaml/content_pres/Makefile
helm/ocaml/extlib/Makefile
helm/ocaml/getter/Makefile
helm/ocaml/grafite/Makefile
helm/ocaml/grafite_engine/Makefile
helm/ocaml/grafite_parser/Makefile
helm/ocaml/hbugs/Makefile
helm/ocaml/hgdome/Makefile
helm/ocaml/hmysql/Makefile
helm/ocaml/lexicon/Makefile
helm/ocaml/library/Makefile
helm/ocaml/logger/Makefile
helm/ocaml/metadata/Makefile
helm/ocaml/metadata/extractor/Makefile
helm/ocaml/metadata/table_creator/Makefile
helm/ocaml/registry/Makefile
helm/ocaml/tactics/Makefile
helm/ocaml/tactics/paramodulation/Makefile
helm/ocaml/thread/Makefile
helm/ocaml/urimanager/Makefile
helm/ocaml/utf8_macros/Makefile
helm/ocaml/whelp/Makefile
helm/ocaml/xml/Makefile
helm/ocaml/xmldiff/Makefile

index 2eb93cd411b7136dc1a820d1758658dd496634ba..62b41c430a251bc29884325a2286c82de454f5db 100644 (file)
@@ -1,6 +1,6 @@
 
 BASENAME = matita
-VERSION = 0.1.0
+VERSION = @MATITA_VERSION@
 
 NULL =
 DISTDIR = $(BASENAME)-$(VERSION)
diff --git a/helm/Makefile.defs.in b/helm/Makefile.defs.in
new file mode 100644 (file)
index 0000000..28adb2a
--- /dev/null
@@ -0,0 +1,7 @@
+OCAMLFIND = OCAMLPATH=@OCAMLPATH@ @OCAMLFIND@
+CAMLP4O = @CAMLP4O@
+LABLGLADECC = @LABLGLADECC@
+HAVE_OCAMLOPT = @HAVE_OCAMLOPT@
+
+MATITA_REQUIRES = @FINDLIB_REQUIRES@
+MATITA_CREQUIRES = @FINDLIB_CREQUIRES@
index c07a962ae2d12011a9019cc44f15e0cb18235e98..1767637199d2824c4df10341b3e502e96f9f5115 100644 (file)
@@ -1,9 +1,9 @@
-AC_INIT(matitaTypes.ml)
+AC_INIT(matita/matitaTypes.ml)
 
 # Distribution settings (i.e. settings to be manipulated before a release)
 DEBUG_DEFAULT="true"
-RT_BASE_DIR_DEFAULT="`pwd`"
-MATITA_VERSION="0.0.1"
+RT_BASE_DIR_DEFAULT="`pwd`/matita"
+MATITA_VERSION="0.1.0"
 # End of distribution settings
 
 AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
@@ -32,6 +32,53 @@ if test $HAVE_CAMLP4O = "yes"; then
 else
   AC_MSG_ERROR(could not find camlp4o)
 fi
+
+# look for METAS dir
+
+OCAMLPATH=""
+LIBSPATH=""
+if test -d libs ; then
+  OCAMLPATH=`pwd`/libs/METAS
+  LIBSPATH=`pwd`/libs
+fi
+if test -d ocaml ; then
+  OCAMLPATH=`pwd`/ocaml/METAS
+  LIBSPATH=`pwd`/ocaml
+fi
+if test -z $OCAMLPATH; then
+  AC_MSG_ERROR(could not find METAS directory)
+fi
+
+# creating META.*
+
+echo -n "creating METAs ... "
+for f in $OCAMLPATH/meta.*.src; do
+  basename=`basename $f`
+  metaname=`echo $basename | sed 's/meta\.\(.*\)\.src/\1/'`
+  dirname=`echo $metaname | sed 's/^helm-//'`
+  metafile="$OCAMLPATH/META.$metaname"
+  cp $f $metafile
+  echo "directory=\"$LIBSPATH/$dirname\"" >> $metafile
+done
+echo "done"
+
+# (libs) findlib requisites
+
+FINDLIB_LIBSREQUIRES="\
+expat \
+gdome2 \
+http \
+lablgtk2 \
+lablgtkmathview \
+lablgtksourceview \
+mysql \
+netstring \
+ulex \
+zip \
+"
+
+# (Matita) findlib requisites
+
 FINDLIB_COMREQUIRES="\
 helm-cic_disambiguation \
 helm-grafite \
@@ -40,12 +87,6 @@ helm-grafite_parser \
 helm-hgdome \
 helm-tactics \
 "
-FINDLIB_CLEANREQUIRES="$FINDLIB_COMREQUIRES"
-FINDLIB_DEPREQUIRES="$FINDLIB_COMREQUIRES"
-FINDLIB_MAKEREQUIRES=" \
-helm-registry \
-helm-extlib \
-"
 FINDLIB_CREQUIRES=" \
 $FINDLIB_COMREQUIRES \
 "
@@ -56,10 +97,10 @@ lablgtkmathview \
 lablgtksourceview \
 helm-xmldiff \
 "
-for r in $FINDLIB_REQUIRES
+for r in $FINDLIB_LIBSREQUIRES $FINDLIB_REQUIRES
 do
   AC_MSG_CHECKING(for $r ocaml library)
-  if OCAMLPATH=../ocaml/METAS $OCAMLFIND query $r &> /dev/null; then
+  if OCAMLPATH=$OCAMLPATH $OCAMLFIND query $r &> /dev/null; then
     AC_MSG_RESULT(yes)
   else
     AC_MSG_ERROR(could not find $r ocaml library)
@@ -117,18 +158,16 @@ AC_SUBST(DEBUG)
 AC_SUBST(TRANSFORMER_MODULE)
 AC_SUBST(FINDLIB_REQUIRES)
 AC_SUBST(FINDLIB_CREQUIRES)
-AC_SUBST(FINDLIB_DEPREQUIRES)
-AC_SUBST(FINDLIB_CLEANREQUIRES)
-AC_SUBST(FINDLIB_MAKEREQUIRES)
 AC_SUBST(HAVE_OCAMLOPT)
 AC_SUBST(LABLGLADECC)
 AC_SUBST(OCAMLFIND)
+AC_SUBST(OCAMLPATH)
 AC_SUBST(RT_BASE_DIR)
 AC_SUBST(MATITA_VERSION)
 
 AC_OUTPUT([
-  matita.conf.xml.sample
-  buildTimeConf.ml
-  Makefile
-  gtkmathview.matita.conf.xml
+  matita/matita.conf.xml.sample
+  matita/buildTimeConf.ml
+  matita/gtkmathview.matita.conf.xml
+  Makefile.defs
 ])
diff --git a/helm/matita/Makefile b/helm/matita/Makefile
new file mode 100644 (file)
index 0000000..3f65ab5
--- /dev/null
@@ -0,0 +1,307 @@
+export SHELL=/bin/bash
+
+include ../Makefile.defs
+
+NULL =
+H=@
+
+OCAML_FLAGS = -pp $(CAMLP4O)
+PKGS = -package "$(MATITA_REQUIRES)"
+CPKGS = -package "$(MATITA_CREQUIRES)"
+OCAML_THREADS_FLAGS = -thread
+OCAML_DEBUG_FLAGS = -g
+OCAMLC_FLAGS = $(OCAML_FLAGS) $(OCAML_THREADS_FLAGS)
+OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLC_FLAGS) $(OCAML_DEBUG_FLAGS)
+OCAMLOPT = $(OCAMLFIND) opt $(OCAMLC_FLAGS)
+OCAMLDEP = $(OCAMLFIND) ocamldep $(OCAML_FLAGS)
+
+MATITA_FLAGS = -noprofile
+NODB=false
+ifeq ($(NODB),true)
+       MATITA_FLAGS += -nodb
+endif
+
+# objects for matita (GTK GUI)
+CMOS =                         \
+       buildTimeConf.cmo       \
+       matitaTypes.cmo         \
+       matitaMisc.cmo          \
+       matitamakeLib.cmo       \
+       matitaInit.cmo          \
+       matitaExcPp.cmo         \
+       matitaEngine.cmo        \
+       matitacLib.cmo          \
+       matitaScript.cmo        \
+       matitaGeneratedGui.cmo  \
+       matitaGtkMisc.cmo       \
+       applyTransformation.cmo \
+       matitaMathView.cmo      \
+       matitaGui.cmo           \
+       $(NULL)
+# objects for matitac (batch compiler)
+CCMOS =                                \
+       buildTimeConf.cmo       \
+       matitaTypes.cmo         \
+       matitaMisc.cmo          \
+       matitamakeLib.cmo       \
+       matitaInit.cmo          \
+       matitaExcPp.cmo         \
+       matitaEngine.cmo        \
+       matitacLib.cmo          \
+       $(NULL)
+MAINCMOS =                     \
+       matitadep.cmo           \
+       matitaclean.cmo         \
+       matitamake.cmo          \
+       $(NULL)
+PROGRAMS_BYTE = matita matitac cicbrowser matitadep matitaclean matitamake dump_moo
+PROGRAMS = $(PROGRAMS_BYTE) matitatop
+PROGRAMS_OPT = $(patsubst %,%.opt,$(PROGRAMS_BYTE))
+
+.PHONY: all
+all: matita.conf.xml $(PROGRAMS) coq.moo
+
+matita.conf.xml: matita.conf.xml.sample
+       @if diff matita.conf.xml.sample matita.conf.xml 1>/dev/null 2>/dev/null; then\
+               touch matita.conf.xml;\
+       else\
+               echo;\
+               echo "matita.conf.xml.sample is newer than matita.conf.xml";\
+               echo;\
+               echo "PLEASE update your configuration file!";\
+               echo "(copying matita.conf.xml.sample should work)";\
+               echo;\
+               false;\
+       fi
+
+matita.conf.xml.sample: matita.conf.xml.sample.in
+       autoconf
+       ./configure
+       @echo 
+       @echo "WARNING: The configuration sample file has changed!"
+       @echo 
+
+coq.moo: library/legacy/coq.ma matitac
+       ./matitac $(MATITA_FLAGS) $<
+coq.moo.opt: library/legacy/coq.ma matitac.opt
+       ./matitac.opt $(MATITA_FLAGS) $<
+
+ifeq ($(HAVE_OCAMLOPT),yes)
+
+CMXS = $(patsubst %.cmo,%.cmx,$(CMOS))
+CCMXS = $(patsubst %.cmo,%.cmx,$(CCMOS))
+MAINCMXS = $(patsubst %.cmo,%.cmx,$(MAINCMOS))
+LIB_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(MATITA_REQUIRES))
+LIBX_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(MATITA_REQUIRES))
+CLIB_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(MATITA_CREQUIRES))
+CLIBX_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(MATITA_CREQUIRES))
+.PHONY: opt
+opt: $(PROGRAMS_OPT) coq.moo.opt
+.PHONY: upx
+upx: $(PROGRAMS_UPX) coq.moo.opt
+
+else
+
+opt:
+       @echo "Native code compilation is disabled"
+
+endif
+
+matita: matita.ml $(LIB_DEPS) $(CMOS)
+       @echo "OCAMLC $<"
+       $(H)$(OCAMLC) $(PKGS) -linkpkg -o $@ $(CMOS) matita.ml
+matita.opt: matita.ml $(LIBX_DEPS) $(CMXS)
+       @echo "OCAMLOPT $<"
+       $(H)$(OCAMLOPT) $(PKGS) -linkpkg -o $@ $(CMXS) matita.ml
+
+dump_moo: dump_moo.ml buildTimeConf.cmo
+       @echo "OCAMLC $<"
+       $(H)$(OCAMLC) $(PKGS) -linkpkg -o $@ buildTimeConf.cmo $<
+dump_moo.opt: dump_moo.ml buildTimeConf.cmx
+       @echo "OCAMLOPT $<"
+       $(H)$(OCAMLOPT) $(PKGS) -linkpkg -o $@ buildTimeConf.cmx $<
+
+matitac: matitac.ml $(CLIB_DEPS) $(CCMOS) $(MAINCMOS)
+       @echo "OCAMLC $<"
+       $(H)$(OCAMLC) $(CPKGS) -linkpkg -o $@ $(CCMOS) $(MAINCMOS) matitac.ml
+matitac.opt: matitac.ml $(CLIBX_DEPS) $(CCMXS) $(MAINCMXS)
+       @echo "OCAMLOPT $<"
+       $(H)$(OCAMLOPT) $(CPKGS) -linkpkg -o $@ $(CCMXS) $(MAINCMXS) matitac.ml
+
+matitatop: matitatop.ml $(CLIB_DEPS) $(CCMOS)
+       @echo "OCAMLC $<"
+       $(H)$(OCAMLC) $(CPKGS) -linkpkg -o $@ toplevellib.cma $(CCMOS) $<
+
+matitadep: matitac
+       @test -f $@ || ln -s $< $@
+matitadep.opt: matitac.opt
+       @test -f $@ || ln -s $< $@
+
+matitaclean: matitac
+       @test -f $@ || ln -s $< $@
+matitaclean.opt: matitac.opt
+       @test -f $@ || ln -s $< $@
+
+matitamake: matitac
+       @test -f $@ || ln -s $< $@
+matitamake.opt: matitac.opt
+       @test -f $@ || ln -s $< $@
+       
+cicbrowser: matita
+       @test -f $@ || ln -s $< $@
+cicbrowser.opt: matita.opt
+       @test -f $@ || ln -s $< $@
+
+matitaGeneratedGui.ml matitaGeneratedGui.mli: matita.glade
+       $(LABLGLADECC) -embed $< > matitaGeneratedGui.ml
+       $(OCAMLC) $(PKGS) -i matitaGeneratedGui.ml > matitaGeneratedGui.mli
+
+.PHONY: clean
+clean:
+       rm -rf *.cma *.cmo *.cmi *.cmx *.cmxa *.a *.o \
+               $(PROGRAMS) \
+               $(PROGRAMS_OPT) \
+               $(PROGRAMS_STATIC) \
+               $(PROGRAMS_UPX) \
+               $(NULL)
+
+TEST_DIRS =                            \
+       library                         \
+       tests                           \
+       tests/bad_tests                 \
+       contribs/LAMBDA-TYPES           \
+       contribs/PREDICATIVE-TOPOLOGY   \
+       $(NULL)
+
+.PHONY: tests tests.opt cleantests cleantests.opt
+tests: $(foreach d,$(TEST_DIRS),$(d)-test)
+tests.opt: $(foreach d,$(TEST_DIRS),$(d)-test-opt)
+cleantests: $(foreach d,$(TEST_DIRS),$(d)-cleantests)
+cleantests.opt: $(foreach d,$(TEST_DIRS),$(d)-cleantests-opt)
+
+%-test: matitac matitadep matitaclean coq.moo
+       -cd $* && make -k clean all
+%-test-opt: matitac.opt matitadep.opt matitaclean.opt coq.moo.opt
+       -cd $* && make -k clean.opt opt
+%-cleantests: matitaclean
+       -cd $* && make clean
+%-cleantests-opt: matitaclean.opt
+       -cd $* && make clean.opt
+
+# {{{ Distribution stuff
+
+STATIC_LINK = dist/static_link/static_link
+# for matita
+STATIC_LIBS =  \
+       t1 t1x  \
+       gtkmathview_gmetadom mathview mathview_backend_gtk mathview_frontend_gmetadom \
+       gtksourceview-1.0 \
+       gdome gmetadom_gdome_cpp_smart \
+       stdc++ \
+       mysqlclient \
+       expat \
+       $(NULL)
+STATIC_EXTRA_LIBS = -cclib -lt1x -cclib -lstdc++
+# for matitac & co
+STATIC_CLIBS = \
+       gdome \
+       mysqlclient \
+       $(NULL)
+STATIC_EXTRA_CLIBS =
+PROGRAMS_STATIC = $(patsubst %,%.static,$(PROGRAMS_OPT))
+PROGRAMS_UPX = $(patsubst %,%.upx,$(PROGRAMS_STATIC))
+
+ifeq ($(HAVE_OCAMLOPT),yes)
+static: $(STATIC_LINK) $(PROGRAMS_STATIC) coq.moo.opt
+else
+upx:
+       @echo "Native code compilation is disabled"
+static:
+       @echo "Native code compilation is disabled"
+endif
+
+$(STATIC_LINK):
+       $(MAKE) -C dist/ $(STATIC_LINK)
+
+matita.opt.static: $(STATIC_LINK) $(LIBX_DEPS) $(CMXS) matita.ml
+       $(STATIC_LINK) $(STATIC_LIBS) -- \
+               $(OCAMLOPT) $(PKGS) -linkpkg -o $@ $(CMXS) matita.ml \
+               $(STATIC_EXTRA_LIBS)
+       strip $@
+dump_moo.opt.static: $(STATIC_LINK) buildTimeConf.cmx dump_moo.ml
+       $(STATIC_LINK) $(STATIC_CLIBS) -- \
+               $(OCAMLOPT) $(PKGS) -linkpkg -o $@ $^ \
+               $(STATIC_EXTRA_CLIBS)
+       strip $@
+matitac.opt.static: $(STATIC_LINK) $(CLIBX_DEPS) $(CCMXS) $(MAINCMXS) matitac.ml
+       $(STATIC_LINK) $(STATIC_CLIBS) -- \
+               $(OCAMLOPT) $(CPKGS) -linkpkg -o $@ $(CCMXS) $(MAINCMXS) matitac.ml \
+               $(STATIC_EXTRA_CLIBS)
+       strip $@
+matitadep.opt.static: matitac.opt.static
+       @test -f $@ || ln -s $< $@
+matitaclean.opt.static: matitac.opt.static
+       @test -f $@ || ln -s $< $@
+matitamake.opt.static: matitac.opt.static
+       @test -f $@ || ln -s $< $@
+cicbrowser.opt.static: matita.opt.static
+       @test -f $@ || ln -s $< $@
+cicbrowser.opt.static.upx: matita.opt.static.upx
+       @test -f $@ || ln -s $< $@
+
+.PHONY: distclean
+distclean: clean
+       $(MAKE) -C dist/ clean
+       rm -f matitaGeneratedGui.ml matitaGeneratedGui.mli
+       rm -f config.log config.status Makefile buildTimeConf.ml
+       rm -f matita.glade.bak matita.gladep.bak
+       rm -rf autom4te.cache/
+       rm -f configure matita.conf.xml.sample
+
+%.upx: %
+       cp $< $@
+       strip $@
+       upx $@
+
+# }}} End of distribution stuff
+
+tags: TAGS
+.PHONY: TAGS
+TAGS:
+       cd ..; otags -vi -r ocaml/ matita/
+
+#.depend: matitaGeneratedGui.ml matitaGeneratedGui.mli *.ml *.mli
+
+.PHONY: depend
+depend:
+       $(OCAMLDEP) *.ml *.mli > .depend
+
+include .depend
+
+%.cmi: %.mli
+       @echo "OCAMLC $<"
+       $(H)$(OCAMLC) $(PKGS) -c $<
+%.cmo %.cmi: %.ml
+       @echo "OCAMLC $<"
+       $(H)$(OCAMLC) $(PKGS) -c $<
+%.cmx: %.ml
+       @echo "OCAMLOPT $<"
+       $(H)$(OCAMLOPT) $(PKGS) -c $<
+%.annot: %.ml
+       @echo "OCAMLC -dtypes $<"
+       $(H)$(OCAMLC) -dtypes $(PKGS) -c $<
+
+$(CMOS): $(LIB_DEPS)
+$(CMOS:%.cmo=%.cmx): $(LIBX_DEPS)
+
+ifeq ($(MAKECMDGOALS),all)
+   $(CMOS:%.cmo=%.cmi): $(LIB_DEPS)
+endif
+ifeq ($(MAKECMDGOALS),)
+   $(CMOS:%.cmo=%.cmi): $(LIB_DEPS)
+endif
+ifeq ($(MAKECMDGOALS),opt)
+   $(CMOS:%.cmo=%.cmi): $(LIBX_DEPS)
+endif
+
+# vim: set foldmethod=marker:
diff --git a/helm/matita/Makefile.in b/helm/matita/Makefile.in
deleted file mode 100644 (file)
index af543d6..0000000
+++ /dev/null
@@ -1,350 +0,0 @@
-export SHELL=/bin/bash
-
-NULL =
-
-MAKEFLAGS+=--no-print-directory
-OCAMLPATH = ../ocaml/METAS/
-OCAMLFIND = OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH @OCAMLFIND@
-CAMLP4O = @CAMLP4O@
-LABLGLADECC = @LABLGLADECC@
-REQUIRES = @FINDLIB_REQUIRES@
-CREQUIRES = @FINDLIB_CREQUIRES@
-DEPREQUIRES = @FINDLIB_DEPREQUIRES@
-CLEANREQUIRES = @FINDLIB_CLEANREQUIRES@
-MAKEREQUIRES = @FINDLIB_MAKEREQUIRES@
-HAVE_OCAMLOPT = @HAVE_OCAMLOPT@
-
-OCAML_FLAGS = -pp $(CAMLP4O)
-PKGS = -package "$(REQUIRES)"
-CPKGS = -package "$(CREQUIRES)"
-DEPPKGS = -package "$(DEPREQUIRES)"
-CLEANPKGS = -package "$(CLEANREQUIRES)"
-MAKEPKGS = -package "$(MAKEREQUIRES)"
-OCAML_THREADS_FLAGS = -thread
-OCAML_DEBUG_FLAGS = -g
-OCAMLC_FLAGS = $(OCAML_FLAGS) $(OCAML_THREADS_FLAGS)
-OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLC_FLAGS) $(OCAML_DEBUG_FLAGS)
-OCAMLOPT = $(OCAMLFIND) opt $(OCAMLC_FLAGS)
-OCAMLDEP = $(OCAMLFIND) ocamldep $(OCAML_FLAGS)
-
-MATITA_FLAGS = -noprofile
-NODB=false
-ifeq ($(NODB),true)
-       MATITA_FLAGS += -nodb
-endif
-
-# objects for matita (GTK GUI)
-CMOS =                         \
-       buildTimeConf.cmo       \
-       matitaTypes.cmo         \
-       matitaMisc.cmo          \
-       matitamakeLib.cmo       \
-       matitaInit.cmo          \
-       matitaExcPp.cmo         \
-       matitaEngine.cmo        \
-       matitacLib.cmo          \
-       matitaScript.cmo        \
-       matitaGeneratedGui.cmo  \
-       matitaGtkMisc.cmo       \
-       applyTransformation.cmo \
-       matitaMathView.cmo      \
-       matitaGui.cmo           \
-       $(NULL)
-# objects for matitac (batch compiler)
-CCMOS =                                \
-       buildTimeConf.cmo       \
-       matitaTypes.cmo         \
-       matitaMisc.cmo          \
-       matitamakeLib.cmo       \
-       matitaInit.cmo          \
-       matitaExcPp.cmo         \
-       matitaEngine.cmo        \
-       matitacLib.cmo          \
-       $(NULL)
-MAINCMOS =                     \
-       matitadep.cmo           \
-       matitaclean.cmo         \
-       matitamake.cmo          \
-       $(NULL)
-DEPCMOS = $(CCMOS)
-CLEANCMOS = $(CCMOS)
-MAKECMOS = \
-       buildTimeConf.cmo       \
-       matitamakeLib.cmo       \
-       $(NULL)
-PROGRAMS_BYTE = matita matitac cicbrowser matitadep matitaclean matitamake dump_moo
-PROGRAMS = $(PROGRAMS_BYTE) matitatop
-PROGRAMS_OPT = $(patsubst %,%.opt,$(PROGRAMS_BYTE))
-
-.PHONY: all
-all: matita.conf.xml $(PROGRAMS) coq.moo
-
-matita.conf.xml: matita.conf.xml.sample
-       @if diff matita.conf.xml.sample matita.conf.xml 1>/dev/null 2>/dev/null; then\
-               touch matita.conf.xml;\
-       else\
-               echo;\
-               echo "matita.conf.xml.sample is newer than matita.conf.xml";\
-               echo;\
-               echo "PLEASE update your configuration file!";\
-               echo "(copying matita.conf.xml.sample should work)";\
-               echo;\
-               false;\
-       fi
-
-matita.conf.xml.sample: matita.conf.xml.sample.in
-       autoconf
-       ./configure
-       @echo 
-       @echo "WARNING: The configuration sample file has changed!"
-       @echo 
-
-coq.moo: library/legacy/coq.ma matitac
-       ./matitac $(MATITA_FLAGS) $<
-coq.moo.opt: library/legacy/coq.ma matitac.opt
-       ./matitac.opt $(MATITA_FLAGS) $<
-
-ifeq ($(HAVE_OCAMLOPT),yes)
-
-CMXS = $(patsubst %.cmo,%.cmx,$(CMOS))
-CCMXS = $(patsubst %.cmo,%.cmx,$(CCMOS))
-MAINCMXS = $(patsubst %.cmo,%.cmx,$(MAINCMOS))
-DEPCMXS = $(patsubst %.cmo,%.cmx,$(DEPCMOS))
-CLEANCMXS = $(patsubst %.cmo,%.cmx,$(CLEANCMOS))
-MAKECMXS = $(patsubst %.cmo,%.cmx,$(MAKECMOS))
-LIB_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(REQUIRES))
-LIBX_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(REQUIRES))
-CLIB_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(CREQUIRES))
-CLIBX_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(CREQUIRES))
-DEPLIB_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(DEPREQUIRES))
-DEPLIBX_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(DEPREQUIRES))
-CLEANLIB_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(CLEANREQUIRES))
-CLEANLIBX_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(CLEANREQUIRES))
-MAKELIB_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d/%a" $(MAKEREQUIRES))
-MAKELIBX_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "native" -format "%d/%a" $(MAKEREQUIRES))
-.PHONY: opt
-opt: $(PROGRAMS_OPT) coq.moo.opt
-.PHONY: upx
-upx: $(PROGRAMS_UPX) coq.moo.opt
-
-else
-
-opt:
-       @echo "Native code compilation is disabled"
-
-endif
-
-matita: $(LIB_DEPS) $(CMOS) matita.ml
-       $(OCAMLC) $(PKGS) -linkpkg -o $@ $(CMOS) matita.ml
-matita.opt: $(LIBX_DEPS) $(CMXS) matita.ml
-       $(OCAMLOPT) $(PKGS) -linkpkg -o $@ $(CMXS) matita.ml
-
-dump_moo: buildTimeConf.cmo dump_moo.ml
-       $(OCAMLC) $(PKGS) -linkpkg -o $@ $^
-dump_moo.opt: buildTimeConf.cmx dump_moo.ml
-       $(OCAMLOPT) $(PKGS) -linkpkg -o $@ $^
-
-matitac: $(CLIB_DEPS) $(CCMOS) $(MAINCMOS) matitac.ml
-       $(OCAMLC) $(CPKGS) -linkpkg -o $@ $(CCMOS) $(MAINCMOS) matitac.ml
-matitac.opt: $(CLIBX_DEPS) $(CCMXS) $(MAINCMXS) matitac.ml
-       $(OCAMLOPT) $(CPKGS) -linkpkg -o $@ $(CCMXS) $(MAINCMXS) matitac.ml
-
-matitatop: matitatop.ml $(CLIB_DEPS) $(CCMOS)
-       $(OCAMLC) $(CPKGS) -linkpkg -o $@ toplevellib.cma $(CCMOS) $<
-
-#  matitadep: matitadep.ml $(DEPLIB_DEPS) $(DEPCMOS)
-#          $(OCAMLC) $(DEPPKGS) -linkpkg -o $@ $(DEPCMOS) $<
-#  matitadep.opt: matitadep.ml $(DEPLIB_DEPS) $(DEPCMXS)
-#          $(OCAMLOPT) $(DEPPKGS) -linkpkg -o $@ $(DEPCMXS) $<
-matitadep: matitac
-       @test -f $@ || ln -s $< $@
-matitadep.opt: matitac.opt
-       @test -f $@ || ln -s $< $@
-
-#  matitaclean: matitaclean.ml $(CLEANLIB_DEPS) $(CLEANCMOS)
-#          $(OCAMLC) $(CLEANPKGS) -linkpkg -o $@ $(CLEANCMOS) $<
-#  matitaclean.opt: matitaclean.ml $(CLEANLIB_DEPS) $(CLEANCMXS)
-#          $(OCAMLOPT) $(CLEANPKGS) -linkpkg -o $@ $(CLEANCMXS) $<
-matitaclean: matitac
-       @test -f $@ || ln -s $< $@
-matitaclean.opt: matitac.opt
-       @test -f $@ || ln -s $< $@
-
-#  matitamake: matitamake.ml $(MAKECMOS)
-#          $(OCAMLC) $(MAKEPKGS) -linkpkg -o $@ $(MAKECMOS) $<
-#  matitamake.opt: matitamake.ml $(MAKECMXS)
-#          $(OCAMLOPT) $(MAKEPKGS) -linkpkg -o $@ $(MAKECMXS) $<
-matitamake: matitac
-       @test -f $@ || ln -s $< $@
-matitamake.opt: matitac.opt
-       @test -f $@ || ln -s $< $@
-       
-cicbrowser: matita
-       @test -f $@ || ln -s $< $@
-cicbrowser.opt: matita.opt
-       @test -f $@ || ln -s $< $@
-
-matitaGeneratedGui.ml matitaGeneratedGui.mli: matita.glade
-       $(LABLGLADECC) -embed $< > matitaGeneratedGui.ml
-       $(OCAMLC) $(PKGS) -i matitaGeneratedGui.ml > matitaGeneratedGui.mli
-
-.PHONY: clean
-clean:
-       rm -rf *.cma *.cmo *.cmi *.cmx *.cmxa *.a *.o \
-               $(PROGRAMS) \
-               $(PROGRAMS_OPT) \
-               $(PROGRAMS_STATIC) \
-               $(PROGRAMS_UPX) \
-               $(NULL)
-
-TEST_DIRS =                            \
-       library                         \
-       tests                           \
-       tests/bad_tests                 \
-       contribs/LAMBDA-TYPES           \
-       contribs/PREDICATIVE-TOPOLOGY   \
-       $(NULL)
-
-.PHONY: tests tests.opt cleantests cleantests.opt
-tests: $(foreach d,$(TEST_DIRS),$(d)-test)
-tests.opt: $(foreach d,$(TEST_DIRS),$(d)-test-opt)
-cleantests: $(foreach d,$(TEST_DIRS),$(d)-cleantests)
-cleantests.opt: $(foreach d,$(TEST_DIRS),$(d)-cleantests-opt)
-
-%-test: matitac matitadep matitaclean coq.moo
-       -cd $* && make -k clean all
-%-test-opt: matitac.opt matitadep.opt matitaclean.opt coq.moo.opt
-       -cd $* && make -k clean.opt opt
-%-cleantests: matitaclean
-       -cd $* && make clean
-%-cleantests-opt: matitaclean.opt
-       -cd $* && make clean.opt
-
-# {{{ Distribution stuff
-
-STATIC_LINK = dist/static_link/static_link
-# for matita
-STATIC_LIBS =  \
-       t1 t1x  \
-       gtkmathview_gmetadom mathview mathview_backend_gtk mathview_frontend_gmetadom \
-       gtksourceview-1.0 \
-       gdome gmetadom_gdome_cpp_smart \
-       stdc++ \
-       mysqlclient \
-       expat \
-       $(NULL)
-STATIC_EXTRA_LIBS = -cclib -lt1x -cclib -lstdc++
-# for matitac & co
-STATIC_CLIBS = \
-       gdome \
-       mysqlclient \
-       $(NULL)
-STATIC_EXTRA_CLIBS =
-PROGRAMS_STATIC = $(patsubst %,%.static,$(PROGRAMS_OPT))
-PROGRAMS_UPX = $(patsubst %,%.upx,$(PROGRAMS_STATIC))
-
-ifeq ($(HAVE_OCAMLOPT),yes)
-static: $(STATIC_LINK) $(PROGRAMS_STATIC) coq.moo.opt
-else
-upx:
-       @echo "Native code compilation is disabled"
-static:
-       @echo "Native code compilation is disabled"
-endif
-
-$(STATIC_LINK):
-       $(MAKE) -C dist/ $(STATIC_LINK)
-
-matita.opt.static: $(STATIC_LINK) $(LIBX_DEPS) $(CMXS) matita.ml
-       $(STATIC_LINK) $(STATIC_LIBS) -- \
-               $(OCAMLOPT) $(PKGS) -linkpkg -o $@ $(CMXS) matita.ml \
-               $(STATIC_EXTRA_LIBS)
-       strip $@
-dump_moo.opt.static: $(STATIC_LINK) buildTimeConf.cmx dump_moo.ml
-       $(STATIC_LINK) $(STATIC_CLIBS) -- \
-               $(OCAMLOPT) $(PKGS) -linkpkg -o $@ $^ \
-               $(STATIC_EXTRA_CLIBS)
-       strip $@
-matitac.opt.static: $(STATIC_LINK) $(CLIBX_DEPS) $(CCMXS) $(MAINCMXS) matitac.ml
-       $(STATIC_LINK) $(STATIC_CLIBS) -- \
-               $(OCAMLOPT) $(CPKGS) -linkpkg -o $@ $(CCMXS) $(MAINCMXS) matitac.ml \
-               $(STATIC_EXTRA_CLIBS)
-       strip $@
-#  matitadep.opt.static: $(STATIC_LINK) matitadep.ml $(DEPLIB_DEPS) $(DEPCMXS)
-#          $(STATIC_LINK) $(STATIC_CLIBS) -- \
-#                  $(OCAMLOPT) $(DEPPKGS) -linkpkg -o $@ $(DEPCMXS) $< \
-#                  $(STATIC_EXTRA_CLIBS)
-#          strip $@
-matitadep.opt.static: matitac.opt.static
-       @test -f $@ || ln -s $< $@
-#  matitaclean.opt.static: $(STATIC_LINK) matitaclean.ml $(CLEANLIB_DEPS) $(CLEANCMXS)
-#          $(STATIC_LINK) $(STATIC_CLIBS) -- \
-#                  $(OCAMLOPT) $(CLEANPKGS) -linkpkg -o $@ $(CLEANCMXS) $< \
-#                  $(STATIC_EXTRA_CLIBS)
-#          strip $@
-matitaclean.opt.static: matitac.opt.static
-       @test -f $@ || ln -s $< $@
-#  matitamake.opt.static: $(STATIC_LINK) matitamake.ml $(MAKECMXS)
-#          $(STATIC_LINK) $(STATIC_CLIBS) -- \
-#                  $(OCAMLOPT) $(PKGS) -linkpkg -o $@ $(MAKECMXS) $< \
-#                  $(STATIC_EXTRA_CLIBS)
-#          strip $@
-matitamake.opt.static: matitac.opt.static
-       @test -f $@ || ln -s $< $@
-cicbrowser.opt.static: matita.opt.static
-       @test -f $@ || ln -s $< $@
-cicbrowser.opt.static.upx: matita.opt.static.upx
-       @test -f $@ || ln -s $< $@
-
-.PHONY: distclean
-distclean: clean
-       $(MAKE) -C dist/ clean
-       rm -f matitaGeneratedGui.ml matitaGeneratedGui.mli
-       rm -f config.log config.status Makefile buildTimeConf.ml
-       rm -f matita.glade.bak matita.gladep.bak
-       rm -rf autom4te.cache/
-       rm -f configure matita.conf.xml.sample
-
-%.upx: %
-       cp $< $@
-       strip $@
-       upx $@
-
-# }}} End of distribution stuff
-
-tags: TAGS
-.PHONY: TAGS
-TAGS:
-       cd ..; otags -vi -r ocaml/ matita/
-
-#.depend: matitaGeneratedGui.ml matitaGeneratedGui.mli *.ml *.mli
-
-.PHONY: depend
-depend:
-       $(OCAMLDEP) *.ml *.mli > .depend
-
-include .depend
-
-%.cmi: %.mli
-       $(OCAMLC) $(PKGS) -c $<
-%.cmo %.cmi: %.ml
-       $(OCAMLC) $(PKGS) -c $<
-%.cmx: %.ml
-       $(OCAMLOPT) $(PKGS) -c $<
-%.annot: %.ml
-       $(OCAMLC) -dtypes $(PKGS) -c $<
-
-$(CMOS): $(LIB_DEPS)
-$(CMOS:%.cmo=%.cmx): $(LIBX_DEPS)
-
-ifeq ($(MAKECMDGOALS),all)
-   $(CMOS:%.cmo=%.cmi): $(LIB_DEPS)
-endif
-ifeq ($(MAKECMDGOALS),)
-   $(CMOS:%.cmo=%.cmi): $(LIB_DEPS)
-endif
-ifeq ($(MAKECMDGOALS),opt)
-   $(CMOS:%.cmo=%.cmi): $(LIBX_DEPS)
-endif
-
-# vim: set foldmethod=marker:
diff --git a/helm/matita/configure.ac b/helm/matita/configure.ac
deleted file mode 100644 (file)
index c07a962..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-AC_INIT(matitaTypes.ml)
-
-# Distribution settings (i.e. settings to be manipulated before a release)
-DEBUG_DEFAULT="true"
-RT_BASE_DIR_DEFAULT="`pwd`"
-MATITA_VERSION="0.0.1"
-# End of distribution settings
-
-AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
-if test $HAVE_OCAMLC = "no"; then
-  AC_MSG_ERROR(could not find ocamlc)
-fi
-AC_CHECK_PROG(HAVE_OCAMLOPT, ocamlopt, yes, no)
-if test $HAVE_OCAMLOPT = "no"; then
-  AC_MSG_WARN(could not find ocamlopt: native code compilation disabled)
-fi
-AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no)
-if test $HAVE_OCAMLFIND = "yes"; then
-  OCAMLFIND="ocamlfind"
-else
-  AC_MSG_ERROR(could not find ocamlfind)
-fi
-AC_CHECK_PROG(HAVE_LABLGLADECC, lablgladecc2, yes, no)
-if test $HAVE_LABLGLADECC = "yes"; then
-  LABLGLADECC="lablgladecc2"
-else
-  AC_MSG_ERROR(could not find lablgladecc2)
-fi
-AC_CHECK_PROG(HAVE_CAMLP4O, camlp4o, yes, no)
-if test $HAVE_CAMLP4O = "yes"; then
-  CAMLP4O="camlp4o"
-else
-  AC_MSG_ERROR(could not find camlp4o)
-fi
-FINDLIB_COMREQUIRES="\
-helm-cic_disambiguation \
-helm-grafite \
-helm-grafite_engine \
-helm-grafite_parser \
-helm-hgdome \
-helm-tactics \
-"
-FINDLIB_CLEANREQUIRES="$FINDLIB_COMREQUIRES"
-FINDLIB_DEPREQUIRES="$FINDLIB_COMREQUIRES"
-FINDLIB_MAKEREQUIRES=" \
-helm-registry \
-helm-extlib \
-"
-FINDLIB_CREQUIRES=" \
-$FINDLIB_COMREQUIRES \
-"
-FINDLIB_REQUIRES="\
-$FINDLIB_CREQUIRES \
-lablgtk2.glade \
-lablgtkmathview \
-lablgtksourceview \
-helm-xmldiff \
-"
-for r in $FINDLIB_REQUIRES
-do
-  AC_MSG_CHECKING(for $r ocaml library)
-  if OCAMLPATH=../ocaml/METAS $OCAMLFIND query $r &> /dev/null; then
-    AC_MSG_RESULT(yes)
-  else
-    AC_MSG_ERROR(could not find $r ocaml library)
-  fi
-done
-
-OCAMLFIND_COMMANDS=""
-# AC_CHECK_PROG(HAVE_OCAMLC_OPT, ocamlc.opt, yes, no)
-# if test $HAVE_OCAMLC_OPT = "yes"; then
-#   if test "$OCAMLFIND_COMMANDS" = ""; then
-#     OCAMLFIND_COMMANDS="ocamlc=ocamlc.opt"
-#   else
-#     OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlc=ocamlc.opt"
-#   fi
-# fi
-# AC_CHECK_PROG(HAVE_OCAMLOPT_OPT, ocamlopt.opt, yes, no)
-# if test $HAVE_OCAMLOPT_OPT = "yes"; then
-#   if test "$OCAMLFIND_COMMANDS" = ""; then
-#     OCAMLFIND_COMMANDS="ocamlopt=ocamlopt.opt"
-#   else
-#     OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlopt=ocamlopt.opt"
-#   fi
-# fi
-if test "$OCAMLFIND_COMMANDS" != ""; then
-  OCAMLFIND="OCAMLFIND_COMMANDS='$OCAMLFIND_COMMANDS' $OCAMLFIND"
-fi
-
-AC_MSG_CHECKING(--enable-debug argument)
-AC_ARG_ENABLE(debug,
-  [  --enable-debug    Turn on debugging],
-  [GIVEN="yes";
-   case "${enableval}" in
-   yes) DEBUG=true ;;
-   no)  DEBUG=false ;;
-   *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
-  esac],
-  [GIVEN="no"; DEBUG="$DEBUG_DEFAULT"])
-MSG=$GIVEN
-if test "$DEBUG" = "true"; then
-  MSG="$MSG, debugging enabled."
-else
-  MSG="$MSG, debugging disabled."
-fi
-AC_MSG_RESULT($MSG)
-
-AC_MSG_CHECKING(--with-runtime-dir argument)
-AC_ARG_WITH(runtime-dir,
-  [ --with-runtime-dir Runtime directory (current working directory if not given)],
-  [ RT_BASE_DIR="${withval}" ],
-  [ RT_BASE_DIR="$RT_BASE_DIR_DEFAULT" ])
-AC_MSG_RESULT($RT_BASE_DIR)
-
-AC_SUBST(CAMLP4O)
-AC_SUBST(DEBUG)
-AC_SUBST(TRANSFORMER_MODULE)
-AC_SUBST(FINDLIB_REQUIRES)
-AC_SUBST(FINDLIB_CREQUIRES)
-AC_SUBST(FINDLIB_DEPREQUIRES)
-AC_SUBST(FINDLIB_CLEANREQUIRES)
-AC_SUBST(FINDLIB_MAKEREQUIRES)
-AC_SUBST(HAVE_OCAMLOPT)
-AC_SUBST(LABLGLADECC)
-AC_SUBST(OCAMLFIND)
-AC_SUBST(RT_BASE_DIR)
-AC_SUBST(MATITA_VERSION)
-
-AC_OUTPUT([
-  matita.conf.xml.sample
-  buildTimeConf.ml
-  Makefile
-  gtkmathview.matita.conf.xml
-])
diff --git a/helm/ocaml/Makefile b/helm/ocaml/Makefile
new file mode 100644 (file)
index 0000000..0d18672
--- /dev/null
@@ -0,0 +1,120 @@
+
+export SHELL=/bin/bash
+
+include ../Makefile.defs
+
+# Warning: the modules must be in compilation order
+NULL =
+MODULES =                      \
+       extlib                  \
+       xml                     \
+       hgdome                  \
+       registry                \
+       hmysql                  \
+       utf8_macros             \
+       thread                  \
+       xmldiff                 \
+       urimanager              \
+       logger                  \
+       getter                  \
+       cic                     \
+       cic_proof_checking      \
+       cic_acic                \
+       acic_content            \
+       content_pres            \
+       grafite                 \
+       metadata                \
+       library                 \
+       cic_unification         \
+       whelp                   \
+       tactics                 \
+       cic_disambiguation      \
+       lexicon                 \
+       grafite_engine          \
+       grafite_parser          \
+       tactics/paramodulation  \
+       $(NULL)
+
+METAS = $(filter-out %/paramodulation,$(MODULES:%=METAS/META.helm-%))
+
+all: metas $(MODULES:%=%.all) 
+opt: metas $(MODULES:%=%.opt)
+world: all opt
+depend: $(MODULES:%=%.depend)
+install: $(MODULES:%=%.install)
+uninstall: $(MODULES:%=%.uninstall)
+clean: $(MODULES:%=%.clean) clean_metas
+
+.stats: $(MODULES:%=%.stats)
+       (for m in $(MODULES); do echo -n "$$m:"; cat $$m/.stats; done) \
+        | sort -t : -k 2 -n -r > .stats
+
+EXTRA_DIST_CLEAN = \
+       libraries-clusters.ps   \
+       libraries-clusters.pdf  \
+       libraries-ext.ps        \
+       libraries.ps            \
+       .dep.dot                \
+       .extdep.dot             \
+       .clustersdep.dot        \
+       $(NULL)
+
+distclean: clean clean_metas
+       rm -f $(METAS)
+       rm -f configure config.log config.cache config.status
+       rm -f Makefile Makefile.common $(EXTRA_DIST_CLEAN)
+
+.PHONY: all opt world metas depend install uninstall clean clean_metas distclean
+
+%.all:
+       $(MAKE) -C $* all 
+%.opt:
+       $(MAKE) -C $* opt
+%.clean:
+       $(MAKE) -C $* clean 
+%.depend:
+       $(MAKE) -C $* depend 
+%.stats:
+       @$(MAKE) -C $* .stats
+
+METAS/META.helm-%: METAS/meta.helm-%.src
+       cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@
+
+.PHONY: .dep.dot
+.dep.dot:
+       echo "digraph G {" > $@
+       echo "   rankdir = TB ;" >> $@
+       for i in $(MODULES); do $(OCAMLFIND) query helm-$$i -recursive -p-format | grep helm | sed "s/^helm-/ \"$$i\" -> \"/g" | sed "s/$$/\";/g" >> $@ ; done
+       mv $@ $@.old ; ./simplify_deps/simplify_deps.opt < $@.old > $@ ; rm $@.old
+       echo "}" >> $@
+
+.PHONY: .alldep.dot
+.alldep.dot:
+       echo "digraph G {" > $@
+       echo "   rankdir = TB ;" >> $@
+       for i in $(MODULES); do $(OCAMLFIND) query helm-$$i -recursive -p-format | grep -v "pxp-" | sed "s/^pxp/pxp[-*]/g" | sed "s/^/ \"helm-$$i\" -> \"/g" | sed "s/$$/\";/g" >> $@ ; done
+       mv $@ $@.old ; ./simplify_deps/simplify_deps.opt < $@.old > $@ ; rm $@.old
+       for i in $(MODULES); do echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];" >> $@ ; done
+       echo "}" >> $@
+
+.extdep.dot: .dep.dot
+       STATS/patch_deps.sh $< $@
+.clustersdep.dot: .dep.dot
+       USE_CLUSTERS=yes STATS/patch_deps.sh $< $@
+
+libraries.ps: .dep.dot
+       dot -Tps -o $@ $<
+libraries-ext.ps: .extdep.dot
+       dot -Tps -o $@ $<
+libraries-clusters.ps: .clustersdep.dot
+       dot -Tps -o $@ $<
+libraries-complete.ps: .alldep.dot
+       dot -Tps -o $@ $<
+
+ps: libraries.ps libraries-ext.ps libraries-clusters.ps
+
+tags: TAGS
+.PHONY: TAGS
+TAGS:
+       otags -vi -r .
+
diff --git a/helm/ocaml/Makefile.common b/helm/ocaml/Makefile.common
new file mode 100644 (file)
index 0000000..1a8b029
--- /dev/null
@@ -0,0 +1,133 @@
+H=@
+
+# This Makefile must be included by another one defining:
+#  $PACKAGE
+#  $PREDICATES
+#  $INTERFACE_FILES
+#  $IMPLEMENTATION_FILES
+#  $EXTRA_OBJECTS_TO_INSTALL
+#  $EXTRA_OBJECTS_TO_CLEAN
+# and put in a directory where there is a .depend file.
+
+# $OCAMLFIND must be set to a meaningful vaule, including OCAMLPATH=
+
+PREPROCOPTIONS = -pp camlp4o
+SYNTAXOPTIONS = -syntax camlp4o
+PREREQ =
+OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -thread
+OCAMLDEBUGOPTIONS = -g
+OCAMLARCHIVEOPTIONS =
+REQUIRES := $(shell $(OCAMLFIND) -query -format '%(requires)' helm-$(PACKAGE))
+OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) $(OCAMLOPTIONS) $(PREPROCOPTIONS)
+OCAMLOPT = $(OCAMLFIND) opt $(OCAMLOPTIONS) $(PREPROCOPTIONS)
+OCAMLDEP = $(OCAMLFIND) ocamldep -package "camlp4 $(CAMLP4REQUIRES)" $(SYNTAXOPTIONS) $(OCAMLDEPOPTIONS) 
+OCAMLLEX = ocamllex
+OCAMLYACC = ocamlyacc
+
+OCAMLC_P4 = $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) $(OCAMLOPTIONS) $(SYNTAXOPTIONS)
+OCAMLOPT_P4 = $(OCAMLFIND) opt $(OCAMLOPTIONS) $(SYNTAXOPTIONS)
+
+LIBRARIES = $(shell $(OCAMLFIND) query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES))
+LIBRARIES_OPT = $(shell $(OCAMLFIND) query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES))
+LIBRARIES_DEPS := \
+       $(foreach X,$(filter-out /usr/lib/ocaml%,$(LIBRARIES)),\
+               $(wildcard \
+                       $(shell dirname $(X))/*.mli \
+                       $(shell dirname $(X))/*.ml \
+                       $(shell dirname $(X))/paramodulation/*.ml \
+                       $(shell dirname $(X))/paramodultation/*.mli))
+
+
+ARCHIVE = $(PACKAGE).cma
+ARCHIVE_OPT = $(PACKAGE).cmxa
+OBJECTS_TO_INSTALL = $(ARCHIVE) $(ARCHIVE_OPT) $(ARCHIVE_OPT:%.cmxa=%.a) \
+                     $(INTERFACE_FILES) $(INTERFACE_FILES:%.mli=%.cmi) \
+                     $(EXTRA_OBJECTS_TO_INSTALL)
+DEPEND_FILES = $(INTERFACE_FILES) $(IMPLEMENTATION_FILES)
+
+$(ARCHIVE): $(IMPLEMENTATION_FILES:%.ml=%.cmo) $(LIBRARIES)
+       $(H)if [ $(PACKAGE) != dummy ]; then \
+       echo "  OCAMLC -a $@";\
+       $(OCAMLC) $(OCAMLARCHIVEOPTIONS) -a -o $@ \
+               $(IMPLEMENTATION_FILES:%.ml=%.cmo); fi
+
+$(ARCHIVE_OPT): $(IMPLEMENTATION_FILES:%.ml=%.cmx) $(LIBRARIES_OPT)
+       $(H)if [ $(PACKAGE) != dummy ]; then \
+       echo "  OCAMLOPT -a $@";\
+       $(OCAMLOPT) $(OCAMLARCHIVEOPTIONS) -a -o $@ \
+               $(IMPLEMENTATION_FILES:%.ml=%.cmx); fi
+
+prereq: $(PREREQ)
+all: prereq $(IMPLEMENTATION_FILES:%.ml=%.cmo) $(ARCHIVE)
+       @echo -n 
+opt: prereq $(IMPLEMENTATION_FILES:%.ml=%.cmx) $(ARCHIVE_OPT)
+       @echo -n 
+world: all opt
+test: test.ml $(ARCHIVE)
+       $(OCAMLC) $(ARCHIVE) -linkpkg -o $@ $<
+test.opt: test.ml $(ARCHIVE_OPT)
+       $(OCAMLOPT) $(ARCHIVE_OPT) -linkpkg -o $@ $<
+
+depend: $(DEPEND_FILES)
+       $(OCAMLDEP) $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) > .depend
+
+$(PACKAGE).ps: .dep.dot
+       dot -Tps -o $@ $<
+
+.dep.dot: .depend
+       ocamldot < .depend > $@
+
+%.cmi: %.mli
+       @echo "  OCAMLC $<"
+       $(H)$(OCAMLC) -c $<
+%.cmo %.cmi: %.ml
+       @echo "  OCAMLC $<"
+       $(H)$(OCAMLC) -c $<
+%.cmx: %.ml
+       @echo "  OCAMLOPT $<"
+       $(H)$(OCAMLOPT) -c $<
+%.annot: %.ml
+       $(OCAMLC) -dtypes $(PKGS) -c $<
+%.ml %.mli: %.mly
+       $(OCAMLYACC) $<
+%.ml: %.mll
+       $(OCAMLLEX) $<
+
+ifneq ($(MAKECMDGOALS), clean)
+$(IMPLEMENTATION_FILES:%.ml=%.cmo): $(LIBRARIES)
+$(IMPLEMENTATION_FILES:%.ml=%.cmi): $(LIBRARIES_DEPS)
+$(IMPLEMENTATION_FILES:%.ml=%.cmx): $(LIBRARIES_OPT)
+endif
+
+clean:
+       rm -f *.cm[ioax] *.cmxa *.o *.a *.annot $(EXTRA_OBJECTS_TO_CLEAN)
+       if [ -f test ]; then rm -f test; else true; fi
+       if [ -f test.opt ]; then rm -f test.opt; else true; fi
+
+backup:
+       cd ..; tar cvzf $(PACKAGE)_$(shell date +%s).tar.gz $(PACKAGE)
+
+ocamlinit:
+       echo "#use \"topfind\";;" > .ocamlinit
+       echo "#thread;;" >> .ocamlinit
+       for p in $(REQUIRES); do echo "#require \"$$p\";;" >> .ocamlinit; done
+       echo "#load \"$(PACKAGE).cma\";;" >> .ocamlinit
+
+# $(STATS_EXCLUDE) may be defined in libraries' Makefile to exclude some file
+# from statistics collection
+STATS_FILES = \
+       $(shell find . -maxdepth 1 -type f -name \*.ml $(foreach f,$(STATS_EXCLUDE),-not -name $(f))) \
+       $(shell find . -maxdepth 1 -type f -name \*.mli $(foreach f,$(STATS_EXCLUDE),-not -name $(f)))
+.stats: $(STATS_FILES)
+       rm -f .stats
+       echo -n "LOC:" >> .stats
+       wc -l $(STATS_FILES) | tail -1 | awk '{ print $$1 }' >> .stats
+
+.PHONY: all opt world backup depend install uninstall clean ocamlinit
+
+ifneq ($(MAKECMDGOALS), depend)
+   include .depend   
+endif
+
+NULL =
+
diff --git a/helm/ocaml/Makefile.common.in b/helm/ocaml/Makefile.common.in
deleted file mode 100644 (file)
index 800bcf7..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-H=@
-
-# This Makefile must be included by another one defining:
-#  $PACKAGE
-#  $PREDICATES
-#  $INTERFACE_FILES
-#  $IMPLEMENTATION_FILES
-#  $EXTRA_OBJECTS_TO_INSTALL
-#  $EXTRA_OBJECTS_TO_CLEAN
-# and put in a directory where there is a .depend file.
-
-OCAMLFIND_DEST_DIR = @OCAMLFIND_DEST_DIR@
-OCAMLPATH = @OCAMLFIND_META_DIR@
-
-PREPROCOPTIONS = -pp camlp4o
-SYNTAXOPTIONS = -syntax camlp4o
-PREREQ =
-OCAMLOPTIONS = -package "$(REQUIRES)" -predicates "$(PREDICATES)" -thread
-OCAMLDEBUGOPTIONS = -g
-OCAMLARCHIVEOPTIONS =
-OCAMLFIND = OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH @OCAMLFIND@
-REQUIRES := $(shell $(OCAMLFIND) -query -format '%(requires)' helm-$(PACKAGE))
-OCAMLC = $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) $(OCAMLOPTIONS) $(PREPROCOPTIONS)
-OCAMLOPT = $(OCAMLFIND) opt $(OCAMLOPTIONS) $(PREPROCOPTIONS)
-OCAMLDEP = $(OCAMLFIND) ocamldep -package "camlp4 $(CAMLP4REQUIRES)" $(SYNTAXOPTIONS) $(OCAMLDEPOPTIONS) 
-OCAMLLEX = ocamllex
-OCAMLYACC = ocamlyacc
-
-OCAMLC_P4 = $(OCAMLFIND) ocamlc $(OCAMLDEBUGOPTIONS) $(OCAMLOPTIONS) $(SYNTAXOPTIONS)
-OCAMLOPT_P4 = $(OCAMLFIND) opt $(OCAMLOPTIONS) $(SYNTAXOPTIONS)
-
-LIBRARIES = $(shell $(OCAMLFIND) query -recursive -predicates "byte $(PREDICATES)" -format "%d/%a" $(REQUIRES))
-LIBRARIES_OPT = $(shell $(OCAMLFIND) query -recursive -predicates "native $(PREDICATES)" -format "%d/%a" $(REQUIRES))
-LIBRARIES_DEPS = \
-       $(foreach X,$(filter-out /usr/lib/ocaml%,$(LIBRARIES)),\
-               $(wildcard \
-                       $(shell dirname $(X))/*.mli \
-                       $(shell dirname $(X))/*.ml \
-                       $(shell dirname $(X))/paramodulation/*.ml \
-                       $(shell dirname $(X))/paramodultation/*.mli))
-
-
-ARCHIVE = $(PACKAGE).cma
-ARCHIVE_OPT = $(PACKAGE).cmxa
-OBJECTS_TO_INSTALL = $(ARCHIVE) $(ARCHIVE_OPT) $(ARCHIVE_OPT:%.cmxa=%.a) \
-                     $(INTERFACE_FILES) $(INTERFACE_FILES:%.mli=%.cmi) \
-                     $(EXTRA_OBJECTS_TO_INSTALL)
-DEPEND_FILES = $(INTERFACE_FILES) $(IMPLEMENTATION_FILES)
-
-$(ARCHIVE): $(IMPLEMENTATION_FILES:%.ml=%.cmo) $(LIBRARIES)
-       $(H)if [ $(PACKAGE) != dummy ]; then \
-       echo "  OCAMLC -a $@";\
-       $(OCAMLC) $(OCAMLARCHIVEOPTIONS) -a -o $@ \
-               $(IMPLEMENTATION_FILES:%.ml=%.cmo); fi
-
-$(ARCHIVE_OPT): $(IMPLEMENTATION_FILES:%.ml=%.cmx) $(LIBRARIES_OPT)
-       $(H)if [ $(PACKAGE) != dummy ]; then \
-       echo "  OCAMLOPT -a $@";\
-       $(OCAMLOPT) $(OCAMLARCHIVEOPTIONS) -a -o $@ \
-               $(IMPLEMENTATION_FILES:%.ml=%.cmx); fi
-
-prereq: $(PREREQ)
-all: prereq $(IMPLEMENTATION_FILES:%.ml=%.cmo) $(ARCHIVE)
-       @echo -n 
-opt: prereq $(IMPLEMENTATION_FILES:%.ml=%.cmx) $(ARCHIVE_OPT)
-       @echo -n 
-world: all opt
-test: test.ml $(ARCHIVE)
-       $(OCAMLC) $(ARCHIVE) -linkpkg -o $@ $<
-test.opt: test.ml $(ARCHIVE_OPT)
-       $(OCAMLOPT) $(ARCHIVE_OPT) -linkpkg -o $@ $<
-
-depend: $(DEPEND_FILES)
-       $(OCAMLDEP) $(INTERFACE_FILES) $(IMPLEMENTATION_FILES) > .depend
-
-$(PACKAGE).ps: .dep.dot
-       dot -Tps -o $@ $<
-
-.dep.dot: .depend
-       ocamldot < .depend > $@
-
-%.cmi: %.mli
-       @echo "  OCAMLC $<"
-       $(H)$(OCAMLC) -c $<
-%.cmo %.cmi: %.ml
-       @echo "  OCAMLC $<"
-       $(H)$(OCAMLC) -c $<
-%.cmx: %.ml
-       @echo "  OCAMLOPT $<"
-       $(H)$(OCAMLOPT) -c $<
-%.annot: %.ml
-       $(OCAMLC) -dtypes $(PKGS) -c $<
-%.ml %.mli: %.mly
-       $(OCAMLYACC) $<
-%.ml: %.mll
-       $(OCAMLLEX) $<
-
-$(IMPLEMENTATION_FILES:%.ml=%.cmo): $(LIBRARIES)
-$(IMPLEMENTATION_FILES:%.ml=%.cmi): $(LIBRARIES_DEPS)
-$(IMPLEMENTATION_FILES:%.ml=%.cmx): $(LIBRARIES_OPT)
-
-clean:
-       rm -f *.cm[ioax] *.cmxa *.o *.a *.annot $(EXTRA_OBJECTS_TO_CLEAN)
-       if [ -f test ]; then rm -f test; else true; fi
-       if [ -f test.opt ]; then rm -f test.opt; else true; fi
-
-install:
-       mkdir $(OCAMLFIND_DEST_DIR)/$(PACKAGE)
-       cp $(OBJECTS_TO_INSTALL) $(OCAMLFIND_DEST_DIR)/$(PACKAGE)
-
-uninstall:
-       cd $(OCAMLFIND_DEST_DIR)/$(PACKAGE) && rm -f $(OBJECTS_TO_INSTALL)
-       rmdir $(OCAMLFIND_DEST_DIR)/$(PACKAGE)
-
-backup:
-       cd ..; tar cvzf $(PACKAGE)_$(shell date +%s).tar.gz $(PACKAGE)
-
-ocamlinit:
-       echo "#use \"topfind\";;" > .ocamlinit
-       echo "#thread;;" >> .ocamlinit
-       for p in $(REQUIRES); do echo "#require \"$$p\";;" >> .ocamlinit; done
-       echo "#load \"$(PACKAGE).cma\";;" >> .ocamlinit
-
-# $(STATS_EXCLUDE) may be defined in libraries' Makefile to exclude some file
-# from statistics collection
-STATS_FILES = \
-       $(shell find . -maxdepth 1 -type f -name \*.ml $(foreach f,$(STATS_EXCLUDE),-not -name $(f))) \
-       $(shell find . -maxdepth 1 -type f -name \*.mli $(foreach f,$(STATS_EXCLUDE),-not -name $(f)))
-.stats: $(STATS_FILES)
-       rm -f .stats
-       echo -n "LOC:" >> .stats
-       wc -l $(STATS_FILES) | tail -1 | awk '{ print $$1 }' >> .stats
-
-.PHONY: all opt world backup depend install uninstall clean ocamlinit
-
-ifneq ($(MAKECMDGOALS), depend)
-   include .depend   
-endif
-
-NULL =
-
diff --git a/helm/ocaml/Makefile.defs.in b/helm/ocaml/Makefile.defs.in
deleted file mode 100644 (file)
index a3681d0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-OCAMLFIND = OCAMLPATH=@OCAMLPATH@ @OCAMLFIND@
diff --git a/helm/ocaml/Makefile.in b/helm/ocaml/Makefile.in
deleted file mode 100644 (file)
index 7ab72ed..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-
-export SHELL=/bin/bash
-
-# Warning: the modules must be in compilation order
-NULL =
-MODULES =                      \
-       extlib                  \
-       xml                     \
-       hgdome                  \
-       registry                \
-       hmysql                  \
-       utf8_macros             \
-       thread                  \
-       xmldiff                 \
-       urimanager              \
-       logger                  \
-       getter                  \
-       cic                     \
-       cic_proof_checking      \
-       cic_acic                \
-       acic_content            \
-       content_pres            \
-       grafite                 \
-       metadata                \
-       library                 \
-       cic_unification         \
-       whelp                   \
-       tactics                 \
-       cic_disambiguation      \
-       lexicon                 \
-       grafite_engine          \
-       grafite_parser          \
-       tactics/paramodulation  \
-       $(NULL)
-
-OCAMLFIND_DEST_DIR = @OCAMLFIND_DEST_DIR@
-OCAMLPATH = @OCAMLFIND_META_DIR@
-OCAMLFIND = OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH @OCAMLFIND@
-
-METAS = $(filter-out %/paramodulation,$(MODULES:%=METAS/META.helm-%))
-
-all: metas $(MODULES:%=%.all) 
-opt: metas $(MODULES:%=%.opt)
-world: all opt
-metas: $(METAS)
-depend: $(MODULES:%=%.depend)
-install: $(MODULES:%=%.install)
-uninstall: $(MODULES:%=%.uninstall)
-clean: $(MODULES:%=%.clean) clean_metas
-
-.stats: $(MODULES:%=%.stats)
-       (for m in $(MODULES); do echo -n "$$m:"; cat $$m/.stats; done) \
-        | sort -t : -k 2 -n -r > .stats
-
-EXTRA_DIST_CLEAN = \
-       libraries-clusters.ps   \
-       libraries-clusters.pdf  \
-       libraries-ext.ps        \
-       libraries.ps            \
-       .dep.dot                \
-       .extdep.dot             \
-       .clustersdep.dot        \
-       $(NULL)
-
-clean_metas:
-       rm -f $(METAS)
-distclean: clean clean_metas
-       rm -f configure config.log config.cache config.status
-       rm -f Makefile Makefile.common $(EXTRA_DIST_CLEAN)
-
-.PHONY: all opt world metas depend install uninstall clean clean_metas distclean
-
-%.all:
-       @OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* all 
-%.opt:
-       @OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* opt
-%.clean:
-       @OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* clean 
-%.depend:
-       @OCAMLPATH=$(OCAMLPATH):$$OCAMLPATH $(MAKE) -C $* depend 
-%.stats:
-       @$(MAKE) -C $* .stats
-
-$(MODULES:%=%.install):
-       cd $(@:%.install=%) && make install
-       export TARGET=$(OCAMLFIND_META_DIR)/$(@:%.install=META.helm-%) ; \
-       cp METAS/$(@:%.install=meta.helm-%.src) $$TARGET && \
-       echo "directory=\"$(OCAMLFIND_DEST_DIR)/$(@:%.install=%)\"" >> $$TARGET
-$(MODULES:%=%.uninstall):
-       cd $(@:%.uninstall=%) && make uninstall
-       rm -f $(OCAMLFIND_META_DIR)/$(@:%.uninstall=META.helm-%)
-METAS/META.helm-%: METAS/meta.helm-%.src
-       cp $< $@ && echo "directory=\"$(shell pwd)/$*\"" >> $@
-
-.PHONY: .dep.dot
-.dep.dot:
-       echo "digraph G {" > $@
-       echo "   rankdir = TB ;" >> $@
-       for i in $(MODULES); do $(OCAMLFIND) query helm-$$i -recursive -p-format | grep helm | sed "s/^helm-/ \"$$i\" -> \"/g" | sed "s/$$/\";/g" >> $@ ; done
-       mv $@ $@.old ; ./simplify_deps/simplify_deps.opt < $@.old > $@ ; rm $@.old
-       echo "}" >> $@
-
-.PHONY: .alldep.dot
-.alldep.dot:
-       echo "digraph G {" > $@
-       echo "   rankdir = TB ;" >> $@
-       for i in $(MODULES); do $(OCAMLFIND) query helm-$$i -recursive -p-format | grep -v "pxp-" | sed "s/^pxp/pxp[-*]/g" | sed "s/^/ \"helm-$$i\" -> \"/g" | sed "s/$$/\";/g" >> $@ ; done
-       mv $@ $@.old ; ./simplify_deps/simplify_deps.opt < $@.old > $@ ; rm $@.old
-       for i in $(MODULES); do echo "\"helm-$$i\" [shape=box,style=filled,fillcolor=yellow];" >> $@ ; done
-       echo "}" >> $@
-
-.extdep.dot: .dep.dot
-       STATS/patch_deps.sh $< $@
-.clustersdep.dot: .dep.dot
-       USE_CLUSTERS=yes STATS/patch_deps.sh $< $@
-
-libraries.ps: .dep.dot
-       dot -Tps -o $@ $<
-libraries-ext.ps: .extdep.dot
-       dot -Tps -o $@ $<
-libraries-clusters.ps: .clustersdep.dot
-       dot -Tps -o $@ $<
-libraries-complete.ps: .alldep.dot
-       dot -Tps -o $@ $<
-
-ps: libraries.ps libraries-ext.ps libraries-clusters.ps
-
-tags: TAGS
-.PHONY: TAGS
-TAGS:
-       otags -vi -r .
-
index cc4da3781cc0c9452097a54631e7ea9c6f4dc7f6..862a9eefb7621142d08c15ea75279b2ee4e090ed 100644 (file)
@@ -16,4 +16,5 @@ IMPLEMENTATION_FILES =                \
        cicNotationPt.ml        \
        $(INTERFACE_FILES:%.mli=%.ml)
 
+include ../../Makefile.defs
 include ../Makefile.common
index 4e36af0191dd949ae4ca87d21c7d60d62f5bac6f..f3d9df42562938c37feaf0cace94c2bf01de4361 100644 (file)
@@ -16,4 +16,5 @@ IMPLEMENTATION_FILES = \
 EXTRA_OBJECTS_TO_INSTALL = cic.ml cic.cmi
 EXTRA_OBJECTS_TO_CLEAN =
 
+include ../../Makefile.defs
 include ../Makefile.common
index a7f1e19cfb557fa7739c05419e40a9f178296fba..2669afb11a7666a58b76a9b18dfbbb1f675444ca 100644 (file)
@@ -9,4 +9,5 @@ INTERFACE_FILES =               \
        $(NULL)
 IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml)
 
+include ../../Makefile.defs
 include ../Makefile.common
index 9c231dd873950690d04ff72ad266c7d95dcd346d..cd03e8281ce756883f0df8e2fb6e3c1931aced65 100644 (file)
@@ -15,7 +15,9 @@ clean:
 distclean:
        rm -f macro_table.dump
 
+include ../../Makefile.defs
 include ../Makefile.common
+
 OCAMLARCHIVEOPTIONS += -linkall
 
 disambiguateTypes.cmi: disambiguateTypes.mli
index bb96479261bf029663ff76fbc84d4a0fb8a126cc..8e2f99a15b693db7e5b9d671d68ccd42ec9d6938 100644 (file)
@@ -23,6 +23,7 @@ EXTRA_OBJECTS_TO_INSTALL = \
             cicMiniReduction.cmo cicMiniReduction.cmx cicMiniReduction.o
 EXTRA_OBJECTS_TO_CLEAN =
 
+include ../../Makefile.defs
 include ../Makefile.common
 
 cicReduction.cmo: OCAMLOPTIONS+=-rectypes
index 174546634a91bf2181bb0718513332c80c049347..383391d70b2caf56db0eb4f35546bab4833f04f2 100644 (file)
@@ -2,8 +2,8 @@ UTILITIES = create_environment parse_library list_uris
 UTILITIES_OPT = $(patsubst %,%.opt,$(UTILITIES))
 LINKOPTS = -linkpkg -thread
 LIBS = helm-cic_proof_checking
-OCAMLC = ocamlfind ocamlc $(LINKOPTS) -package $(LIBS)
-OCAMLOPT = ocamlfind opt $(LINKOPTS) -package $(LIBS)
+OCAMLC = $(OCAMLFIND) ocamlc $(LINKOPTS) -package $(LIBS)
+OCAMLOPT = $(OCAMLFIND) opt $(LINKOPTS) -package $(LIBS)
 all: $(UTILITIES)
        @echo -n
 opt: $(UTILITIES_OPT)
@@ -17,3 +17,5 @@ opt: $(UTILITIES_OPT)
 clean:
        rm -f $(UTILITIES) $(UTILITIES_OPT) *.cm[iox] *.o
 
+include ../../../Makefile.defs
+
index 3db00fe5cea4c89964fa89c360f5e2899de0368c..62be3a61c844bf4ad60cf820149599bf429d0f0f 100644 (file)
@@ -9,4 +9,5 @@ INTERFACE_FILES = \
 IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml)
 EXTRA_OBJECTS_TO_INSTALL =
 
+include ../../Makefile.defs
 include ../Makefile.common
diff --git a/helm/ocaml/configure.ac b/helm/ocaml/configure.ac
deleted file mode 100644 (file)
index ec6498a..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-AC_INIT(Makefile.in)
-
-AC_CHECK_PROG(HAVE_OCAMLC, ocamlc, yes, no)
-if test $HAVE_OCAMLC = "no"; then
-  AC_MSG_ERROR(could not find ocamlc in PATH, please make sure ocaml is installed)
-fi
-
-AC_CHECK_PROG(HAVE_OCAMLFIND, ocamlfind, yes, no)
-if test $HAVE_OCAMLFIND = "no"; then
-  AC_MSG_ERROR(could not find ocamlfind in PATH, please make sure findlib is installed)
-else
-  OCAMLFIND=ocamlfind
-fi
-
-OCAMLFIND_COMMANDS=""
-AC_CHECK_PROG(HAVE_OCAMLC_OPT, ocamlc.opt, yes, no)
-if test $HAVE_OCAMLC_OPT = "yes"; then
-  if test "$OCAMLFIND_COMMANDS" = ""; then
-    OCAMLFIND_COMMANDS="ocamlc=ocamlc.opt"
-  else
-    OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlc=ocamlc.opt"
-  fi
-fi
-AC_CHECK_PROG(HAVE_OCAMLOPT_OPT, ocamlopt.opt, yes, no)
-if test $HAVE_OCAMLOPT_OPT = "yes"; then
-  if test "$OCAMLFIND_COMMANDS" = ""; then
-    OCAMLFIND_COMMANDS="ocamlopt=ocamlopt.opt"
-  else
-    OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamlopt=ocamlopt.opt"
-  fi
-fi
-AC_CHECK_PROG(HAVE_OCAMLDEP_OPT, ocamldep.opt, yes, no)
-if test $HAVE_OCAMLDEP_OPT = "yes"; then
-  if test "$OCAMLFIND_COMMANDS" = ""; then
-    OCAMLFIND_COMMANDS="ocamldep=ocamldep.opt"
-  else
-    OCAMLFIND_COMMANDS="$OCAMLFIND_COMMANDS ocamldep=ocamldep.opt"
-  fi
-fi
-if test "$OCAMLFIND_COMMANDS" != ""; then
-  OCAMLFIND="OCAMLFIND_COMMANDS='$OCAMLFIND_COMMANDS' $OCAMLFIND"
-fi
-
-AC_MSG_CHECKING("where to install the META files")
-OCAMLFIND_META_DIR=`pwd`/METAS
-AC_MSG_RESULT($OCAMLFIND_META_DIR)
-
-AC_SUBST(OCAMLFIND)
-AC_SUBST(OCAMLFIND_META_DIR)
-
-AC_OUTPUT([
-  Makefile
-  Makefile.common
-])
-
index 459b793f0fc497db3dd6c483d1b3f36d490fb653..0cd8b4226f763100b6c19beb76080536e7084d4d 100644 (file)
@@ -40,6 +40,7 @@ cicNotationParser.cmx: OCAMLOPT = $(OCAMLOPT_P4)
 cicNotationLexer.ml.annot: OCAMLC = $(OCAMLC_P4)
 cicNotationParser.ml.annot: OCAMLC = $(OCAMLC_P4)
 
+include ../../Makefile.defs
 include ../Makefile.common
 
 # <cross> cross compatibility among ocaml 3.09 and ocaml 3.08, to be removed as
index c67778af4aaf4e696d79294aeb437cabf0b4947e..d2e5cddf62f62c8ed6e08e70696703a618e528f6 100644 (file)
@@ -13,4 +13,5 @@ IMPLEMENTATION_FILES = \
 EXTRA_OBJECTS_TO_INSTALL =
 EXTRA_OBJECTS_TO_CLEAN =
 
+include ../../Makefile.defs
 include ../Makefile.common
index 9ebca237ab9fad7823d9dfa63d40f34c449768ae..0f2132eec8deb690f4dfd9c94cd6717c9e65583d 100644 (file)
@@ -16,5 +16,6 @@ IMPLEMENTATION_FILES = \
        http_getter_types.ml \
        $(INTERFACE_FILES:%.mli=%.ml)
 
+include ../../Makefile.defs
 include ../Makefile.common
 
index 182cd456171cef5b2225ce19cdef45dd6c9f8f39..6eb3e7a783806914c5339b3cc1eafdb815a47e79 100644 (file)
@@ -10,4 +10,5 @@ IMPLEMENTATION_FILES =                \
        $(INTERFACE_FILES:%.mli=%.ml)
 
 
+include ../../Makefile.defs
 include ../Makefile.common
index e72acd29c3e99fbe945e2ee8109b71d6f6d1d954..d810e1be2d68230a0d6852679b7d7fee0fd48862 100644 (file)
@@ -9,4 +9,5 @@ INTERFACE_FILES = \
        $(NULL)
 IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml)
 
+include ../../Makefile.defs
 include ../Makefile.common
index 25896da87d32039ba5c95774d3a89af9d8e85840..8482825a605b4f3e467743be33d3208ec0ce4000 100644 (file)
@@ -42,4 +42,5 @@ test_dep: test_dep.ml $(PACKAGE).cma
        @echo "  OCAMLC $<"
        @$(OCAMLC) $(LOCAL_LINKOPTS) -o $@ $<
 
+include ../../Makefile.defs
 include ../Makefile.common
index c38ac3e92de5a0fdf5d028bcda02466e7e8203e3..4170d8081cf24651a43543b1a3d92ae7192e002e 100644 (file)
@@ -24,6 +24,7 @@ INTERFACE_FILES = \
        hbugs_types.mli \
        $(patsubst %.ml, %.mli, $(IMPLEMENTATION_FILES))
 
+include ../../Makefile.defs
 include ../Makefile.common
 include .tutors.ml
 include .generated_tutors.ml
index a7bb4dbb6a0fce5bfe06cd421845d1fa82c5b41d..9630da26a7951ecd89599cdd772e9c85a0b94185 100644 (file)
@@ -8,4 +8,5 @@ INTERFACE_FILES =               \
 
 IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml)
 
+include ../../Makefile.defs
 include ../Makefile.common
index 2ae1d4e59b619e524126a84c851c16dfb6a65650..8a83eb23e88600f770dab5fde6b82d353edd43e0 100644 (file)
@@ -8,4 +8,5 @@ IMPLEMENTATION_FILES = \
 EXTRA_OBJECTS_TO_INSTALL =
 EXTRA_OBJECTS_TO_CLEAN =
 
+include ../../Makefile.defs
 include ../Makefile.common
index 0e9c09526454ab75b0185eff257272f81e752ef1..b8582bacac18d5103e3130f09a6cd556d5199440 100644 (file)
@@ -14,4 +14,5 @@ IMPLEMENTATION_FILES =                \
        $(INTERFACE_FILES:%.mli=%.ml)
 
 
+include ../../Makefile.defs
 include ../Makefile.common
index 74a61aed50d7355192e463e526f66b1a17d13aac..4f0ca3eb8dbfac378e5522821046e472c3e16179 100644 (file)
@@ -16,4 +16,5 @@ INTERFACE_FILES = \
 IMPLEMENTATION_FILES = \
        $(INTERFACE_FILES:%.mli=%.ml)
 
+include ../../Makefile.defs
 include ../Makefile.common
index dab9f5cb30b77c00c788f3de87cbb3e0bf409c1e..39d6900848e5c95c0880a60f991c7d92427a956b 100644 (file)
@@ -5,5 +5,6 @@ INTERFACE_FILES = \
 IMPLEMENTATION_FILES = \
        $(INTERFACE_FILES:%.mli=%.ml)
 
+include ../../Makefile.defs
 include ../Makefile.common
 
index 0a24964518842116d0c6d8d0fa645b38dec1ee14..d02d021a5b3844e6137924de968e3f26be100f8f 100644 (file)
@@ -12,6 +12,7 @@ IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml)
 EXTRA_OBJECTS_TO_INSTALL =
 EXTRA_OBJECTS_TO_CLEAN =
 
+include ../../Makefile.defs
 include ../Makefile.common
 
 all: all_table_creator all_extractor
index 7c2aec0e555e316822d111bf4f3d93cf0a669ff7..579a5655f268e2b60766d7392dbe12edb0599afa 100644 (file)
@@ -1,4 +1,3 @@
-OCAMLFIND=ocamlfind
 
 all: extractor extractor_manager 
        @echo -n
@@ -34,3 +33,4 @@ export: extractor.opt extractor_manager.opt
                ./extractor_manager.opt 1>export.out 2>export.err
        
 include .depend
+include ../../../Makefile.defs
index 06335681c0db4f7b5e3f220d5796150f17c56292..c54e52d4ac13ece7d3f4f18212f662af95389a0f 100644 (file)
@@ -1,5 +1,4 @@
 REQUIRES = mysql helm-metadata
-OCAMLFIND = ocamlfind
 
 INTERFACE_FILES = 
 IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml) 
@@ -33,3 +32,4 @@ clean:
        rm -f table_creator table_creator.opt table_destructor table_destructor.opt
 
 include .depend
+include ../../../Makefile.defs
index 4d3e0a52c0dca2fd70cea00613258a4a320b39a9..bb9715ab4988ed39dc83d5dea5e12022ce4d068e 100644 (file)
@@ -3,5 +3,6 @@ PACKAGE = registry
 INTERFACE_FILES = helm_registry.mli
 IMPLEMENTATION_FILES = helm_registry.ml
 
+include ../../Makefile.defs
 include ../Makefile.common
 
index db8cc9231f978623d6ad2111362bbb23857513f6..c7bf44694d5a28b4794213a367c3030a7c16f259 100644 (file)
@@ -28,6 +28,7 @@ tactics.mli: tactics.ml *Tactics.mli *Tactic.mli fourierR.mli ring.mli paramodul
 
 STATS_EXCLUDE = tactics.mli
 
+include ../../Makefile.defs
 include ../Makefile.common
 
 OCAMLOPTIONS+= -I paramodulation
index ba8bd40aa8e0d66590c475ce4bade1ba607aafd0..f1b613400836daee295bf5fc44cc491c140d6cdc 100644 (file)
@@ -2,6 +2,7 @@ PACKAGE = dummy
 
 LOCALLINKOPTS = -package helm-cic_disambiguation,helm-content_pres,helm-grafite,helm-grafite_parser,helm-tactics
 
+include ../../../Makefile.defs
 include ../../Makefile.common
 
 all $(PACKAGE).cma :saturate 
index db722abaa32435f5cbd14835903e251063c7f8fe..46f009e07ae90ee1c721f169b19aefce274eb02c 100644 (file)
@@ -6,6 +6,7 @@ IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml)
 all: thread_fake.cma
 opt: thread_fake.cmxa
 
+include ../../Makefile.defs
 include ../Makefile.common
 
 fake/threadSafe.cmi: fake/threadSafe.mli
index afd7d4442543c5374a6bb5b7dbf39a890d75ce0c..592c0854edf502656f67f39f92e5226223af4427 100644 (file)
@@ -6,4 +6,5 @@ IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml)
 EXTRA_OBJECTS_TO_INSTALL =
 EXTRA_OBJECTS_TO_CLEAN =
 
+include ../../Makefile.defs
 include ../Makefile.common
index 952b9f597c3fd13dca2490975c9f7a85acfc35b7..2b737627f17ef01c058e03fe2d01b4e7515a2ced 100644 (file)
@@ -38,5 +38,6 @@ extra_clean:
 
 STATS_EXCLUDE = utf8MacroTable.ml
 
+include ../../Makefile.defs
 include ../Makefile.common
 
index f43c77fa907824d9dc83df224733c6775e9fb48e..6d8d3958f938998b1614598e41c63e4130eb0b09 100644 (file)
@@ -7,4 +7,5 @@ INTERFACE_FILES =       \
 
 IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml)
 
+include ../../Makefile.defs
 include ../Makefile.common
index 6ca7bd944067dac40e1b342b84d41e81b8c5ccb7..7948435aac9209973d2871ec9c6bc609213c16f5 100644 (file)
@@ -8,4 +8,5 @@ IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml)
 EXTRA_OBJECTS_TO_INSTALL =
 EXTRA_OBJECTS_TO_CLEAN =
 
+include ../../Makefile.defs
 include ../Makefile.common
index 62492069ed009eefdd5633f3aeead4ee719745d1..afffaeefb7625c0a3fc5b2a5616fceda322ff21f 100644 (file)
@@ -6,4 +6,5 @@ IMPLEMENTATION_FILES = $(INTERFACE_FILES:%.mli=%.ml)
 EXTRA_OBJECTS_TO_INSTALL =
 EXTRA_OBJECTS_TO_CLEAN =
 
+include ../../Makefile.defs
 include ../Makefile.common