X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=matita%2FMakefile;h=e13b2d657deb13511e840755b47dcd872af9ced8;hb=10717eeb347ae366a79ec4abf38f00c2cee1dff3;hp=97158f9dd566a7c997380b51dd162f60978f58d4;hpb=b3779638cd49747f4b71784fba57cfb0a56297f5;p=helm.git diff --git a/matita/Makefile b/matita/Makefile index 97158f9dd..e13b2d657 100644 --- a/matita/Makefile +++ b/matita/Makefile @@ -41,7 +41,6 @@ MLI = \ matitaScript.mli \ matitaMathView.mli \ matitaGui.mli \ - matitaAutoGui.cmo \ $(NULL) CMLI = \ matitaTypes.mli \ @@ -62,7 +61,7 @@ MAINCMLI = \ gragrep.mli \ $(NULL) # objects for matita (GTK GUI) -ML = buildTimeConf.ml matitaGeneratedGui.ml $(MLI:%.mli=%.ml) +ML = buildTimeConf.ml matitaGeneratedGui.ml matitaAutoGui.ml $(MLI:%.mli=%.ml) # objects for matitac (batch compiler) CML = buildTimeConf.ml $(CMLI:%.mli=%.ml) MAINCML = $(MAINCMLI:%.mli=%.ml) @@ -84,17 +83,8 @@ MAINCMOS = $(MAINCML:%.ml=%.cmo) CMXS = $(patsubst %.cmo,%.cmx,$(CMOS)) CCMXS = $(patsubst %.cmo,%.cmx,$(CCMOS)) MAINCMXS = $(patsubst %.cmo,%.cmx,$(MAINCMOS)) -$(CMOS): $(LIB_DEPS) +$(CMOS) : $(LIB_DEPS) $(CMXOS): $(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 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)) @@ -408,21 +398,31 @@ depend.opt: $(H)echo " OCAMLDEP -native" $(H)$(OCAMLDEP) -native *.ml *.mli > .depend.opt -ifeq ($(MAKECMDGOALS),) - include .depend -endif - -ifeq ($(MAKECMDGOALS), all) - include .depend +# this should be sligtly better, since should work with 'make all opt' +ifneq (,$(findstring all,$(MAKECMDGOALS))) + # if we 'make all opt' the deps for 'all' should be fine also for opt + # if we 'make opt all' it should not work... + TO_INCLUDE+=.depend + TO_DEPEND_ON=$(LIB_DEPS) +else ifneq (,$(findstring opt,$(MAKECMDGOALS))) + TO_INCLUDE+=.depend.opt + TO_DEPEND_ON=$(LIBX_DEPS) +else ifneq (,$(findstring world,$(MAKECMDGOALS))) + ifeq ($(HAVE_OCAMLOPT),yes) + TO_INCLUDE+=.depend.opt + TO_DEPEND_ON=$(LIBX_DEPS) + else + TO_INCLUDE+=.depend + TO_DEPEND_ON=$(LIB_DEPS) + endif +else + TO_INCLUDE+=.depend + TO_DEPEND_ON=$(LIB_DEPS) endif -ifeq ($(MAKECMDGOALS), opt) - include .depend.opt -endif +$(MLI:%.mli=%.cmi) $(ML:%.ml=%.cmo) $(ML:%.ml=%.cmx): $(TO_DEPEND_ON) -ifeq ($(MAKECMDGOALS), world) - include .depend.opt -endif +include $(TO_INCLUDE) %.cmi: %.mli $(H)echo " OCAMLC $<"