X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2FMakefile;h=78e8fe8d574abc27b5fb33bd5e516f2acc78809d;hb=e15e22b0bb0723470473e37ccbcd75b90494c614;hp=40a37472876d4c1856a99f78120b8fa6fed6eb04;hpb=0927e99496346a4b713e454c61a5246b778a0b04;p=helm.git diff --git a/helm/software/matita/Makefile b/helm/software/matita/Makefile index 40a374728..78e8fe8d5 100644 --- a/helm/software/matita/Makefile +++ b/helm/software/matita/Makefile @@ -80,8 +80,6 @@ all: $(PROGRAMS) # 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)) @@ -89,16 +87,14 @@ LIB_DEPS := $(shell $(OCAMLFIND) query -recursive -predicates "byte" -format "%d 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 +opt: $(PROGRAMS_OPT) +upx: $(PROGRAMS_UPX) +.PHONY: opt upx +ifeq ($(HAVE_OCAMLOPT),yes) +world: all opt else - -opt: - @echo "Native code compilation is disabled" - +world: all endif matita: matita.ml $(LIB_DEPS) $(CMOS) @@ -159,6 +155,15 @@ clean: $(PROGRAMS_UPX) \ $(NULL) +.PHONY: distclean +distclean: clean + $(MAKE) -C dist/ clean + rm -f matitaGeneratedGui.ml matitaGeneratedGui.mli + rm -f buildTimeConf.ml + rm -f matita.glade.bak matita.gladep.bak + rm -f matita.conf.xml.sample + rm -rf .matita + TEST_DIRS = \ library \ tests \ @@ -184,19 +189,35 @@ cleantests.opt: $(foreach d,$(TEST_DIRS),$(d)-cleantests-opt) # {{{ Distribution stuff -ifeq ($(wildcard matitac.opt),matitac.opt) +ifeq ($(HAVE_OCAMLOPT),yes) BEST=opt +BEST_EXT=.opt else BEST=all +BEST_EXT= endif -stdlib: - MATITA_RT_BASE_DIR=`pwd` \ - MATITA_FLAGS="-system -conffile `pwd`/matita.conf.xml.build" \ - ./matitamake -init build_stdlib +ifeq ($(DISTRIBUTED),yes) + +dist_library: dist_library@library +dist_library_clean: + @echo "MATITACLEAN -system all" + $(H)./matitaclean$(BEST_EXT) \ + -system -conffile `pwd`/matita.conf.xml.build all +dist_library@%: + @echo "MATITAMAKE -system init" + $(H)MATITA_RT_BASE_DIR=`pwd` \ + MATITA_FLAGS="-system -conffile `pwd`/matita.conf.xml.build" \ + ./matitamake$(BEST_EXT) -conffile `pwd`/matita.conf.xml.build \ + init dist_$* `pwd`/$* + @echo "MATITAMAKE -system build" + $(H)MATITA_RT_BASE_DIR=`pwd` \ + MATITA_FLAGS="-system -conffile `pwd`/matita.conf.xml.build" \ + ./matitamake$(BEST_EXT) -conffile `pwd`/matita.conf.xml.build \ + build dist_$* + touch $@ -# MATITA_RT_BASE_DIR=`pwd` \ - $(MAKE) MATITA_FLAGS="-system -conffile `pwd`/matita.conf.xml.build" -C library/ $(BEST) +endif DEST = @RT_BASE_DIR@ INSTALL_STUFF = \ @@ -244,7 +265,7 @@ PROGRAMS_STATIC = $(patsubst %,%.static,$(PROGRAMS_OPT)) PROGRAMS_UPX = $(patsubst %,%.upx,$(PROGRAMS_STATIC)) ifeq ($(HAVE_OCAMLOPT),yes) -static: $(STATIC_LINK) $(PROGRAMS_STATIC) coq.moo.opt +static: $(STATIC_LINK) $(PROGRAMS_STATIC) else upx: @echo "Native code compilation is disabled" @@ -281,14 +302,6 @@ cicbrowser.opt.static: matita.opt.static 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 buildTimeConf.ml - rm -f matita.glade.bak matita.gladep.bak - rm -f matita.conf.xml.sample - %.upx: % cp $< $@ strip $@