clean: $(foreach d,$(SUBDIRS),rec@clean@$(d))
distclean: $(foreach d,$(SUBDIRS),rec@distclean@$(d))
$(H)rm -rf .matita library-stamp depend-stamp
-install: $(foreach d,$(SUBDIRS),rec@install@$(d))
+install-indep: $(foreach d,$(SUBDIRS),rec@install-indep@$(d))
+install-arch: $(foreach d,$(SUBDIRS),rec@install-arch@$(d))
+install: install-indep install-arch
uninstall: $(foreach d,$(SUBDIRS),rec@uninstall@$(d))
rec@%:
- $(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*))
+ $(MAKE) -C $(word 2, $(subst @, ,$*)) $(word 1, $(subst @, ,$*)) DESTDIR=$(shell pwd)/$(DESTDIR)
# {{{ Distribution stuff
$(MAKE) -C matita/help/C/ install DESTDIR=$(CURDIR)/$(DISTDIR)/docs/manual/
dist_mktarball:
tar czf $(DISTDIR).tar.gz $(DISTDIR)
- tar cjf $(DISTDIR).tar.bz2 $(DISTDIR)
+ #tar cjf $(DISTDIR).tar.bz2 $(DISTDIR)
rm -rf $(DISTDIR)
dist_extract:
$(H)$(MAKE) -C syntax_extensions
depend: syntax-extensions $(MODULES:%=rec@depend@%)
depend.opt: syntax-extensions $(MODULES:%=rec@depend.opt@%)
-install: $(MODULES:%=rec@install@%)
+install-arch: $(MODULES:%=rec@install@%)
+install-indep:
uninstall: $(MODULES:%=rec@uninstall@%)
clean: $(MODULES:%=rec@clean@%) clean_metas
applyTransformation.cmo: applyTransformation.cmi
applyTransformation.cmx: applyTransformation.cmi
-buildTimeConf.cmo: buildTimeConf.cmi
-buildTimeConf.cmx: buildTimeConf.cmi
-dump_moo.cmo: buildTimeConf.cmi
-dump_moo.cmx: buildTimeConf.cmx
-gragrep.cmo: matitaInit.cmi buildTimeConf.cmi gragrep.cmi
-gragrep.cmx: matitaInit.cmx buildTimeConf.cmx gragrep.cmi
+gragrep.cmo: matitaInit.cmi gragrep.cmi
+gragrep.cmx: matitaInit.cmx gragrep.cmi
lablGraphviz.cmo: lablGraphviz.cmi
lablGraphviz.cmx: lablGraphviz.cmi
matitaclean.cmo: matitaMisc.cmi matitaInit.cmi matitaclean.cmi
matitaclean.cmx: matitaMisc.cmx matitaInit.cmx matitaclean.cmi
matitacLib.cmo: matitamakeLib.cmi matitaMisc.cmi matitaInit.cmi \
- matitaExcPp.cmi matitaEngine.cmi buildTimeConf.cmi \
- applyTransformation.cmi matitacLib.cmi
+ matitaExcPp.cmi matitaEngine.cmi applyTransformation.cmi matitacLib.cmi
matitacLib.cmx: matitamakeLib.cmx matitaMisc.cmx matitaInit.cmx \
- matitaExcPp.cmx matitaEngine.cmx buildTimeConf.cmx \
- applyTransformation.cmx matitacLib.cmi
+ matitaExcPp.cmx matitaEngine.cmx applyTransformation.cmx matitacLib.cmi
matitac.cmo: matitaprover.cmi matitamake.cmi matitadep.cmi matitaclean.cmi \
matitacLib.cmi matitaWiki.cmx matitaInit.cmi matitaEngine.cmi gragrep.cmi
matitac.cmx: matitaprover.cmx matitamake.cmx matitadep.cmx matitaclean.cmx \
matitaEngine.cmx: matitaEngine.cmi
matitaExcPp.cmo: matitaExcPp.cmi
matitaExcPp.cmx: matitaExcPp.cmi
-matitaGtkMisc.cmo: matitaTypes.cmi matitaGeneratedGui.cmx buildTimeConf.cmi \
- matitaGtkMisc.cmi
-matitaGtkMisc.cmx: matitaTypes.cmx matitaGeneratedGui.cmx buildTimeConf.cmx \
- matitaGtkMisc.cmi
+matitaGtkMisc.cmo: matitaTypes.cmi matitaGeneratedGui.cmx matitaGtkMisc.cmi
+matitaGtkMisc.cmx: matitaTypes.cmx matitaGeneratedGui.cmx matitaGtkMisc.cmi
matitaGui.cmo: matitaprover.cmi matitamakeLib.cmi matitaTypes.cmi \
matitaScript.cmi matitaMisc.cmi matitaMathView.cmi matitaGtkMisc.cmi \
- matitaGeneratedGui.cmx matitaExcPp.cmi buildTimeConf.cmi matitaGui.cmi
+ matitaGeneratedGui.cmx matitaExcPp.cmi matitaGui.cmi
matitaGui.cmx: matitaprover.cmx matitamakeLib.cmx matitaTypes.cmx \
matitaScript.cmx matitaMisc.cmx matitaMathView.cmx matitaGtkMisc.cmx \
- matitaGeneratedGui.cmx matitaExcPp.cmx buildTimeConf.cmx matitaGui.cmi
-matitaInit.cmo: matitamakeLib.cmi buildTimeConf.cmi matitaInit.cmi
-matitaInit.cmx: matitamakeLib.cmx buildTimeConf.cmx matitaInit.cmi
-matitamakeLib.cmo: buildTimeConf.cmi matitamakeLib.cmi
-matitamakeLib.cmx: buildTimeConf.cmx matitamakeLib.cmi
+ matitaGeneratedGui.cmx matitaExcPp.cmx matitaGui.cmi
+matitaInit.cmo: matitamakeLib.cmi matitaInit.cmi
+matitaInit.cmx: matitamakeLib.cmx matitaInit.cmi
+matitamakeLib.cmo: matitamakeLib.cmi
+matitamakeLib.cmx: matitamakeLib.cmi
matitamake.cmo: matitamakeLib.cmi matitaInit.cmi matitamake.cmi
matitamake.cmx: matitamakeLib.cmx matitaInit.cmx matitamake.cmi
matitaMathView.cmo: matitamakeLib.cmi matitaTypes.cmi matitaScript.cmi \
matitaMisc.cmi matitaGuiTypes.cmi matitaGtkMisc.cmi matitaExcPp.cmi \
- lablGraphviz.cmi buildTimeConf.cmi applyTransformation.cmi \
- matitaMathView.cmi
+ lablGraphviz.cmi applyTransformation.cmi matitaMathView.cmi
matitaMathView.cmx: matitamakeLib.cmx matitaTypes.cmx matitaScript.cmx \
matitaMisc.cmx matitaGuiTypes.cmi matitaGtkMisc.cmx matitaExcPp.cmx \
- lablGraphviz.cmx buildTimeConf.cmx applyTransformation.cmx \
- matitaMathView.cmi
-matitaMisc.cmo: buildTimeConf.cmi matitaMisc.cmi
-matitaMisc.cmx: buildTimeConf.cmx matitaMisc.cmi
+ lablGraphviz.cmx applyTransformation.cmx matitaMathView.cmi
+matitaMisc.cmo: matitaMisc.cmi
+matitaMisc.cmx: matitaMisc.cmi
matita.cmo: matitaTypes.cmi matitaScript.cmi matitaMathView.cmi \
- matitaInit.cmi matitaGui.cmi matitaGtkMisc.cmi buildTimeConf.cmi \
- applyTransformation.cmi
+ matitaInit.cmi matitaGui.cmi matitaGtkMisc.cmi applyTransformation.cmi
matita.cmx: matitaTypes.cmx matitaScript.cmx matitaMathView.cmx \
- matitaInit.cmx matitaGui.cmx matitaGtkMisc.cmx buildTimeConf.cmx \
- applyTransformation.cmx
+ matitaInit.cmx matitaGui.cmx matitaGtkMisc.cmx applyTransformation.cmx
matitaprover.cmo: matitaInit.cmi matitaExcPp.cmi matitaEngine.cmi \
- buildTimeConf.cmi matitaprover.cmi
+ matitaprover.cmi
matitaprover.cmx: matitaInit.cmx matitaExcPp.cmx matitaEngine.cmx \
- buildTimeConf.cmx matitaprover.cmi
+ matitaprover.cmi
matitaScript.cmo: matitamakeLib.cmi matitaTypes.cmi matitaMisc.cmi \
- matitaGtkMisc.cmi matitaEngine.cmi buildTimeConf.cmi \
- applyTransformation.cmi matitaScript.cmi
+ matitaGtkMisc.cmi matitaEngine.cmi applyTransformation.cmi \
+ matitaScript.cmi
matitaScript.cmx: matitamakeLib.cmx matitaTypes.cmx matitaMisc.cmx \
- matitaGtkMisc.cmx matitaEngine.cmx buildTimeConf.cmx \
- applyTransformation.cmx matitaScript.cmi
+ matitaGtkMisc.cmx matitaEngine.cmx applyTransformation.cmx \
+ matitaScript.cmi
matitaTypes.cmo: matitaTypes.cmi
matitaTypes.cmx: matitaTypes.cmi
matitaWiki.cmo: matitaInit.cmi matitaExcPp.cmi matitaEngine.cmi \
- buildTimeConf.cmi applyTransformation.cmi
+ applyTransformation.cmi
matitaWiki.cmx: matitaInit.cmx matitaExcPp.cmx matitaEngine.cmx \
- buildTimeConf.cmx applyTransformation.cmx
+ applyTransformation.cmx
matitaGtkMisc.cmi: matitaGeneratedGui.cmx
matitaGui.cmi: matitaGuiTypes.cmi
matitaGuiTypes.cmi: matitaTypes.cmi matitaGeneratedGui.cmx
MATITA_FLAGS += -nodb
endif
-# objects for matita (GTK GUI)
-CMOS = \
- buildTimeConf.cmo \
- lablGraphviz.cmo \
- matitaTypes.cmo \
- matitaMisc.cmo \
- matitamakeLib.cmo \
- matitaInit.cmo \
- matitaExcPp.cmo \
- matitaEngine.cmo \
- applyTransformation.cmo \
- matitacLib.cmo \
- matitaprover.cmo \
- matitaGtkMisc.cmo \
- matitaScript.cmo \
- matitaGeneratedGui.cmo \
- matitaMathView.cmo \
- matitaGui.cmo \
+MLI = \
+ lablGraphviz.mli \
+ matitaTypes.mli \
+ matitaMisc.mli \
+ matitamakeLib.mli \
+ matitaInit.mli \
+ matitaExcPp.mli \
+ matitaEngine.mli \
+ applyTransformation.mli \
+ matitacLib.mli \
+ matitaprover.mli \
+ matitaGtkMisc.mli \
+ matitaScript.mli \
+ matitaMathView.mli \
+ matitaGui.mli \
matitaAutoGui.cmo \
$(NULL)
-# objects for matitac (batch compiler)
-CCMOS = \
- buildTimeConf.cmo \
- matitaTypes.cmo \
- matitaMisc.cmo \
- matitamakeLib.cmo \
- matitaInit.cmo \
- matitaExcPp.cmo \
- matitaEngine.cmo \
- applyTransformation.cmo \
- matitacLib.cmo \
- matitaWiki.cmo \
- matitaprover.cmo \
+CMLI = \
+ matitaTypes.mli \
+ matitaMisc.mli \
+ matitamakeLib.mli \
+ matitaInit.mli \
+ matitaExcPp.mli \
+ matitaEngine.mli \
+ applyTransformation.mli \
+ matitacLib.mli \
+ matitaWiki.mli \
+ matitaprover.mli \
$(NULL)
-MAINCMOS = \
- matitadep.cmo \
- matitaclean.cmo \
- matitamake.cmo \
- gragrep.cmo \
+MAINCMLI = \
+ matitadep.mli \
+ matitaclean.mli \
+ matitamake.mli \
+ gragrep.mli \
$(NULL)
+# objects for matita (GTK GUI)
+ML = buildTimeConf.ml matitaGeneratedGui.ml $(MLI:%.mli=%.ml)
+# objects for matitac (batch compiler)
+CML = buildTimeConf.ml $(CMLI:%.mli=%.ml)
+MAINCML = $(MAINCMLI:%.mli=%.ml)
+
PROGRAMS_BYTE = \
- matita matitac cicbrowser matitadep matitaclean matitamake matitaprover matitawiki
+ matita matitac cicbrowser matitadep matitaclean \
+ matitamake matitaprover matitawiki
PROGRAMS = $(PROGRAMS_BYTE) matitatop
PROGRAMS_OPT = $(patsubst %,%.opt,$(PROGRAMS_BYTE))
NOINST_PROGRAMS = dump_moo gragrep
.PHONY: all
all: $(PROGRAMS) $(NOINST_PROGRAMS)
-# all: matita.conf.xml $(PROGRAMS) coq.moo
-
-# matita.conf.xml: matita.conf.xml.sample
-# $(H)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
-
-# coq.moo: library/legacy/coq.ma matitac
-# ./matitac $(MATITA_FLAGS) $<
-# coq.moo.opt: library/legacy/coq.ma matitac.opt
-# ./matitac.opt $(MATITA_FLAGS) $<
+CMOS = $(ML:%.ml=%.cmo)
+CCMOS = $(CML:%.ml=%.cmo)
+MAINCMOS = $(MAINCML:%.ml=%.cmo)
CMXS = $(patsubst %.cmo,%.cmx,$(CMOS))
CCMXS = $(patsubst %.cmo,%.cmx,$(CCMOS))
MAINCMXS = $(patsubst %.cmo,%.cmx,$(MAINCMOS))
+$(CMOS): $(LIB_DEPS)
+$(CMXOS): $(LIBX_DEPS)
+
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))
cicbrowser.opt: matita.opt
$(H)test -f $@ || ln -s $< $@
-matitaGeneratedGui.ml matitaGeneratedGui.mli: matita.glade
+matitaGeneratedGui.ml: matita.glade
$(H)$(LABLGLADECC) -embed $< > matitaGeneratedGui.ml
- $(H)rm -f matitaGeneratedGui.mli
- $(H)#$(OCAMLC) $(PKGS) -i matitaGeneratedGui.ml > matitaGeneratedGui.mli
.PHONY: clean
clean:
$(NOINST_PROGRAMS) $(NOINST_PROGRAMS_OPT) \
$(PROGRAMS_STATIC) \
$(PROGRAMS_UPX) \
+ *.stamp \
$(NULL)
.PHONY: distclean
ifeq ($(DISTRIBUTED),yes)
-dist_library: dist_library@standard-library
-dist_library@%:
+
+MATITA_CFLAGS = #-nodb
+
+dist_library: install_preliminaries dist_library@standard-library
+dist_library@%:
$(H)echo "MATITAMAKE init $*"
- $(H)(cd $(DESTDIR) && ./matitamake init $* $(DESTDIR)/ma/$*)
+ $(H)(HOME=$(WHERE) USER=builder MATITA_RT_BASE_DIR=$(WHERE) MATITA_FLAGS='$(MATITA_CFLAGS)' $(WHERE)/matitamake init $* $(WHERE)/ma/$*)
$(H)echo "MATITAMAKE publish $*"
- $(H)(cd $(DESTDIR) && ./matitamake publish $*)
+ $(H)(HOME=$(WHERE) USER=builder MATITA_RT_BASE_DIR=$(WHERE) MATITA_FLAGS='$(MATITA_CFLAGS)' $(WHERE)/matitamake publish $*)
$(H)echo "MATITAMAKE destroy $*"
- $(H)(cd $(DESTDIR) && ./matitamake destroy $*)
+ $(H)(HOME=$(WHERE) USER=builder MATITA_RT_BASE_DIR=$(WHERE) MATITA_FLAGS='$(MATITA_CFLAGS)' $(WHERE)/matitamake destroy $*)
+ # sqlite3 only
+ $(H)cp $(WHERE)/.matita/matita.db $(WHERE)/metadata.db || true
+ #$(H)rm -rf $(WHERE)/.matita/
touch $@
endif
-dist_pre: matitaGeneratedGui.ml matitaGeneratedGui.mli
+dist_pre: matitaGeneratedGui.ml
$(MAKE) -C dist/ dist_pre
-DESTDIR = $(RT_BASE_DIR)
+WHERE = $(DESTDIR)/$(RT_BASE_DIR)
INSTALL_STUFF = \
icons/ \
help/ \
INSTALL_STUFF_BIN = $(INSTALL_PROGRAMS)
endif
-install: install_preliminaries dist_library install_conclusion
+install-arch: install_preliminaries
+install-indep: dist_library
-install_preliminaries:
- install -d $(DESTDIR)/ma/
- cp -a $(INSTALL_STUFF) $(DESTDIR)
+install_preliminaries : install_preliminaries.stamp
+
+install_preliminaries.stamp:
+ $(H)install -d $(WHERE)/ma/
+ $(H)cp -a $(INSTALL_STUFF) $(WHERE)
ifeq ($(HAVE_OCAMLOPT),yes)
- install -s $(INSTALL_STUFF_BIN) $(DESTDIR)
- for p in $(INSTALL_PROGRAMS); do ln -fs $$p.opt $(DESTDIR)/$$p; done
+ $(H)install -s $(INSTALL_STUFF_BIN) $(WHERE)
+ $(H)for p in $(INSTALL_PROGRAMS); do ln -fs $$p.opt $(WHERE)/$$p; done
else
- install $(INSTALL_STUFF_BIN) $(DESTDIR)
+ $(H)install $(INSTALL_STUFF_BIN) $(WHERE)
endif
- for p in $(INSTALL_PROGRAMS_LINKS_MATITAC); do \
- ln -fs matitac $(DESTDIR)/$$p;\
+ $(H)for p in $(INSTALL_PROGRAMS_LINKS_MATITAC); do \
+ ln -fs matitac $(WHERE)/$$p;\
done
- for p in $(INSTALL_PROGRAMS_LINKS_MATITA); do \
- ln -fs matita $(DESTDIR)/$$p;\
+ $(H)for p in $(INSTALL_PROGRAMS_LINKS_MATITA); do \
+ ln -fs matita $(WHERE)/$$p;\
done
- cp -a library/ $(DESTDIR)/ma/standard-library
- cp -a contribs/ $(DESTDIR)/ma/
-
-install_conclusion:
+ $(H)cp -a library/ $(WHERE)/ma/standard-library
+ $(H)cp -a contribs/ $(WHERE)/ma/
+ $(H)touch install_preliminaries.stamp
uninstall:
- rm -rf $(DESTDIR)
+ $(H)rm -rf $(WHERE)
STATIC_LINK = dist/static_link/static_link
# for matita
# }}} End of distribution stuff
+# {{{ Deps and automatic rules
tags: TAGS
.PHONY: TAGS
TAGS:
$(H)cd ..; otags -vi -r components/ matita/
-#.depend: matitaGeneratedGui.ml matitaGeneratedGui.mli *.ml *.mli
-
.PHONY: depend
-depend:
+depend:
$(H)echo " OCAMLDEP"
- $(H)$(OCAMLDEP) *.ml *.mli > .depend
-depend.opt:
+ $(H)$(OCAMLDEP) > .depend
+depend.opt:
$(H)echo " OCAMLDEP -native"
$(H)$(OCAMLDEP) -native *.ml *.mli > .depend.opt
include .depend.opt
endif
+ifeq ($(MAKECMDGOALS), world)
+ include .depend.opt
+endif
+
%.cmi: %.mli
$(H)echo " OCAMLC $<"
$(H)$(OCAMLC) $(PKGS) -c $<
$(H)echo " OCAMLC -dtypes $<"
$(H)$(OCAMLC) -dtypes $(PKGS) -c $<
-$(CMOS): $(LIB_DEPS)
-$(CMOS:%.cmo=%.cmx): $(LIBX_DEPS)
-
deps.ps: deps.dot
dot -Tps -o $@ $<
deps.dot: .depend
./dep2dot.rb < $< | tred > $@
-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
+# }}} End of deps and automatic rules
# vim: set foldmethod=marker:
+++ /dev/null
-(* Copyright (C) 2006, HELM Team.
- *
- * This file is part of HELM, an Hypertextual, Electronic
- * Library of Mathematics, developed at the Computer Science
- * Department, University of Bologna, Italy.
- *
- * HELM is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * HELM is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HELM; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- * MA 02111-1307, USA.
- *
- * For details, see the HELM World-Wide-Web page,
- * http://helm.cs.unibo.it/
- *)
-
-(* $Id$ *)
-
-val base_uri : string
-val blank_uri : string
-val browser_history_size : int
-val closed_xml : string
-val console_history_size : int
-val core_notation_script : string
-val current_proof_uri : string
-val debug : bool
-val default_font_size : int
-val gtkmathview_conf : string
-val gtkrc_file : string
-val help_dir : string
-val images_dir : string
-val lang_file : string
-val matita_conf : string
-val matitamake_makefile_template : string
-val matitamake_makefile_template_devel : string
-val phrase_sep : string
-val runtime_base_dir : string
-val script_font : string
-val script_template : string
-val stdlib_dir_devel : string
-val stdlib_dir_installed : string
-val undo_history_size : int
-val version : string
-
.PHONY: txt
txt: txt-stamp
txt-stamp: html-stamp
- $(MAKE) $(TXTS)
+ $(MAKE) txt-stamp-rec
touch $@
+txt-stamp-rec: $(TXTS)
%.txt: %.html
w3m -dump -no-graph $< > $@